Bugs item #1755466, was opened at 2007-07-17 15:19
Message generated for change (Comment added) made by sjoerd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1755466&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/runtime
Group: Pathfinder 0.18
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: thijs (thijswes)
Assigned to: Sjoerd Mullender (sjoerd)
Summary: XQ: printing special characters in comment nodes

Initial Comment:
Hi,

I found MonetDB/XQuery has trouble with the printing of a document/node 
sequence when special characters occur in comment nodes. 

For example, the attached test.xml looks like this

<?xml version="1.0" encoding="utf-8"?>
<test>
<!--
<comment/>
abc
& def
-->
</test>

Looking at the tables in the DB I see the comment string is correctly parsed 
(including the &), but when the node is printed output stops just before &, the 
rest of the document/node/node sequence is not printed.

E.g.,
doc("..../test.xml")

gives the following output:

<?xml version="1.0" encoding="utf-8"?>
<test>
<!--
<comment/>
abc

The problem only occurs when a line *starts* with '&'

----------------------------------------------------------------------

>Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-07-31 10:22

Message:
Logged In: YES 
user_id=43607
Originator: NO

Checked in in stable branch.

----------------------------------------------------------------------

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-07-30 15:14

Message:
Logged In: YES 
user_id=43607
Originator: NO

Fixed with a test in
pathfinder/tests/BugTracker/Tests/comment-print-bug.SF-1755466.*
This will be checked in as soon as Sourceforge lets me.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2007-07-25 17:47

Message:
Logged In: YES 
user_id=572415
Originator: NO

tagged summary as "XQ".


----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2007-07-18 10:39

Message:
Logged In: YES 
user_id=963970
Originator: NO

I think its not Mapi but the serialiser

----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2007-07-18 10:36

Message:
Logged In: YES 
user_id=963970
Originator: NO

it goes wrong in multiple ways it seems:

RD 1184747690872: inserting prompt
TD 1184747698266: write final block: 17 bytes
TX 1184747698266: sdoc("test.xml")
RD 1184747698310: read final block: 189 bytes
RX 1184747698310: &1 0 1 1 1
% xquery.result # table_name
% xml   # name
% varchar   # type
% 60    # length
[ "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<test>\n\t<!--
    <comment/>
    abc
    & def
    -->\n</test>\n" ]

For some reason the newlines in the comment are not escaped.  I can
imagine that in the = mode MapiClient uses the same sort of thing happens
therefore having the & as first char on the line or something.

----------------------------------------------------------------------

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-07-18 10:26

Message:
Logged In: YES 
user_id=43607
Originator: NO

Undoubtedly this has to do with the Mapi protocol where lines starting
with & have a meaning.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1755466&group_id=56967

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to