Re: [XQuery] Computed CDATA constructor

> What is it that you would like to do with such a computed constructor 
> that you can't do without it? Can you think of any scenarios where the 
> following two expressions could have different results?
>
> 1. <foo>{ cdata{ $a } }</foo>
> 2. <foo>{ $a }</foo>

Yes. If the implementor has decided to retain CDATA sections and $a is 
"<", then
1. <foo><![CDATA[<]]></foo>
2. <foo>&lt;</foo>

Although these are semantically identical, it may be important to the 
user to provide such hints for serialization. Other applications may 
depend on this information being retained (for example, creating a 
document for an app that parses CDATA sections differently -- or for 
that matter scrapes them out).

--Sarah

Received on Monday, 10 November 2003 17:33:05 UTC