XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Michael NevinsSubject: CDATA preservation
Author: Michael Nevins
Date: 17 May 2010 01:06 PM
I am storing code snippets as CDATA in my XML file. When I do an XQuery from the XML file using the Schema you generate I do not maintain the CDATA.


I start with:
<Programs Use="Context">
<Program Use="Context" Name="Pgm_SS">
<Routines Use="Context">
<Routine Use="Target" Name="R_Main" Type="ST">
<STContent>
<Line Number="0"><![CDATA[// ******************** Unclassified Technical Data ********************************/]]></Line>
<Line Number="1"><![CDATA[//]]></Line>
<Line
I Get:
<Line Number="0">// ******************** Unclassified Technical Data ********************************/</Line><Line Number="1">//</Line>



Michael A. Nevins
Northrop Grumman
Electronic Systems

Postnext
Tony LavinioSubject: CDATA preservation
Author: Tony Lavinio
Date: 17 May 2010 02:09 PM
Few systems that process XML do, or even could.

CDATA is just an alternate syntax for text - anything that can go in a CDATA region can be expressed, although with escape characters, without being wrapped.

When XML parsers read in plain text or CDATA sections, they convert them all internally to plain text - there is no difference in the XML data model.

As long as the writer of the original stream, and the consumer of the output both parse XML according to the rules (and to be a conforming parser, a program *must* obey the rules), there should be no problem in using the output.

Postnext
Minollo I.Subject: CDATA preservation
Author: Minollo I.
Date: 17 May 2010 02:13 PM
...that said, take a look at: http://www.xquery.com/tips_and_tricks/including_CDATA_in_results.html

Postnext
Michael NevinsSubject: CDATA preservation
Author: Michael Nevins
Date: 17 May 2010 02:15 PM
I will.
Thanks,

Michael A. Nevins
Northrop Grumman
Electronic Systems

Postnext
Michael NevinsSubject: CDATA preservation
Author: Michael Nevins
Date: 17 May 2010 02:55 PM
I am a bit confused here. My XML instance document contains the CDATA properly. I need to maintain the existing CDATA format through the XQuery process. The link you sent does not seem to address my situation.

Thanks,

Michael A. Nevins
Northrop Grumman
Electronic Systems

Posttop
Michael NevinsSubject: CDATA preservation
Author: Michael Nevins
Date: 17 May 2010 03:06 PM
My Apology, you were right!

Thank you,


Michael A. Nevins
Northrop Grumman
Electronic Systems

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.