> Any implementation that uses Xerces, libxml2, or another DOM-derived
> model will most likely retain CDATA on input. Again, it is not a
> requirement of XQuery, but reasonable for users to request of an
> implementation that a document they input would have identical output.
>
> Perhaps with a "standard" enhancement package to XQuery implementors
> can agree on ways to create arbitrary XML, evaluate XQuery statement
> strings within XQuery, and convert strings to nodes and vice versa.
> XQuery is a brilliant language but I'm afraid that without
> standardization on the features likely to be added by many
> implementors
> it will be difficult for users to switch vendors.
XSLT users do occasionally grumble that they can't retain CDATA sections
through a transformation. They also grumble (rather more frequently, and in
my view with greater justification) about the inability to preserve entity
references through a transformation. As far as I know, no XSLT vendor has
attempted to respond to these grumbles by adding features which would
require fundamental changes to the data model, and I can't see any intrinsic
reason why the situation with XQuery should be any different.
Michael Kay