Feature Requests item #1766415, was opened at 2007-08-02 21:36
Message generated for change (Comment added) made by mlkersten
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482471&aid=1766415&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: None
>Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Peter Boncz (boncz)
>Assigned to: Nobody/Anonymous (nobody)
>Summary: XQ:CDATA segments are not (properly??) conserved

Initial Comment:
CData tags 
Cdata tags disappear when I call back a document for example I store in the 
database : 
 pf:add-doc(“c://test.xml”, “test”)
<new>
<hello><![CDATA[ myData]]></hello>
</new>

I get the document back as: 
doc(“test”)
<new>
<hello>myData</hello>
</new>


(submitted on behalf of [EMAIL PROTECTED])


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

>Comment By: Martin Kersten (mlkersten)
Date: 2007-11-10 23:20

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

Let's move it to the feature request list.

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

Comment By: Jan Rittinger (tsheyar)
Date: 2007-08-03 17:20

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

I had a look at the current version of the serialization spec (not the one
from 2003). It comes with a serialization parameter cdata-section-elements
that is bound to a list of qnames
(http://www.w3.org/TR/xslt-xquery-serialization/#XML_CDATA-SECTION-ELEMENTS).
The list of qnames is then used to serialize all text nodes whose parents
tagname matches one of the qnames as CDATA.

This means that CDATA nodes as Jens says are normal text nodes -- there is
no distinction between them -- and only a special serialization parameter
allows us to change the serialization format of some textnodes. (It depends
on the list of qnames one uses for serialization and not on the input --
there is no *CDATA node*.)

My conclusion is that this bug report is no valid bug report but merely a
feature request for more serialization parameters.

Jan

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

Comment By: Arjen P. de Vries (apdv)
Date: 2007-08-03 15:13

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

Notice that I raised this issue before, and then Jens commented it was
expected behaviour:
http://sourceforge.net/mailarchive/message.php?msg_name=f7253dfd0701021516j10e31661m20f15764c023742d%40mail.gmail.com

Also, from my recent posts on monetdb-developers (JanR, I am trying your
patch right now BTW):
  Disclaimer: I am not very sure what should be correct.
  http://www.w3.org/TR/2003/WD-xslt-xquery-serialization-20030502/
  states
  Note:
  This is phrased to permit an implementor to provide an option that
  attempts to preserve CDATA sections present in the source document.

I am a proponent of an attempt to preserve CDATA as it was inserted,
so this deviates from Jens' earlier reply, simply because now another 
person ran in the same problem as I did before.

Cheers,

Arjen

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

Comment By: Peter Boncz (boncz)
Date: 2007-08-02 21:49

Message:
Logged In: YES 
user_id=591107
Originator: YES

Our shredder just treats CDATA as a notation for characters. For
serialization, any special chars (a reason for using CDATA) are serialized
with proper escapes (..well, hopefully)

Are we supposed to conserve CDATA nodes?

In the XQery and xPath specs I could not find an answer to this. The XML
Infoset spec even specifically states that this issue is out of its scope.

I found some remark on a Michael Rhys weblog about serialization
standards, however, that seems to imply that CDATA section are to be
treated as separate text nodes, and serialized again in CDATA form. Note
that this implies that data(<a> <!CDATA [ spaces-around ]> </a>) produces
double spacing around "spaces-around".. 

I think this could be implemented , probably without too much effort
(introducing a CDATA node that is treated identical to text node, expcept
in serialization), but should we?

relaying this to you, Teggy, as the departure of Jens for pratical
purposes has made you our stand conformance expert.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482471&aid=1766415&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