Preserving CDATA sections
Hello,
When you create a database from an XML document that had CDATA section, the CDATA mark up is getting removed.
We would like to retain the CDATA sections.
Any information on how to preserve the CDATA section is greatly appreciated.
Thanks
Rao
Dear Rao,
note that XQuery does not differentiate between CDATA sections and normal text nodes, i.e., all CDATA markup is internally dissolved and eventually serialized as standard text.
This is different in XSLT (which is not supported by BaseX): some transformers implement the "cdata-section-elements" attribute to allow specific elements to be serialized as CDATA; see also:
http://www.w3.org/TR/1999/REC-xslt-19991116#output
Hope this helps, Christian ___________________________
Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen
Quoted text · Nageswararao Yenuganti · 18 lines
On Wed, Feb 17, 2010 at 5:57 AM, Nageswararao Yenuganti <ynrao at lycos.com> wrote: > Hello, > > When you create a database from an XML document that had CDATA section, the > CDATA mark up is getting removed. > > We would like to retain the CDATA sections. > > Any information on how to preserve the CDATA section is greatly appreciated. > > Thanks > Rao > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >
Written for BaseX 6. BaseX may have changed since: please check the current documentation.