bug-gift
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-GIFT] Problem with placement of comments in gift-log.mrml


From: David Squire
Subject: Re: [bug-GIFT] Problem with placement of comments in gift-log.mrml
Date: Sat, 17 Jul 2004 09:00:03 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Wolfgang Müller wrote:

On Friday 16 July 2004 02:21, David Squire wrote:
been introduced that writes a comment block to the gift-log.mrml each
time the server is started or a message is send, e.g.:

<!-- This instance of the GIFT was started on -->
<!-- Fri Jul 16 12:12:06 2004
-->
<!-- PID 2388 -->


<!-- The following message was sent by
Peer INET Address: 127.0.0.1
At: Fri Jul 16 12:12:26 2004
-->


Unfortunately there is a problem. These comment blocks appear *before* the

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

line, which must start an XML document. Consequently they cause Perl's
XML parser to choke. Could this order please be reversed?

The answer is: No, unfortunately not.

The GIFT log contains the message as it was received, i.e. *unparsed*. In other words, the string received. If I where to put the said comment after the <?xml ...?> line, I would have to analyze the structure first, add a comment to the structure and than write out what I have parsed. While this is feasible, I find it is not in accord with what the log is supposed to be (IMHO, among other things): a debugging tool.
Ah. So that comment doesn't actually get sent as part of a message. That was not clear to me.

The solution to your problem is very simple (I have used it already). Grep for something matching the diverse versions of the <?xml... line, then feed what you want to the parser.

Yes, yes, I already had a work-around, I was just hoping that it could be fixed so that such a work around would not be necessary. To retain the philosophical purity of the log file that you want, things would have to be rearranged so that these comments were indeed part of the MRML messages, and came after the <?xml.. line. Maybe I will have a dig around in the code and see how hard this is to do.

Regards,

David


--
Dr. David McG. Squire, Postgraduate Research Coordinator (Caulfield),
Computer Science and Software Engineering, Monash University, Australia
http://www.csse.monash.edu.au/~davids/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]