[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

CDATA with computed constructors

Jens T Teubner teubner at us.ibm.com
Mon Feb 25 09:04:05 PST 2008


  CDATA with computed constructors
http://x-query.com/mailman/listinfo/talk wrote on 02/25/2008 08:11:06 AM:

> I was trying to create a CDATA-section within an computed
> constructor. Therefore, i've read the relevant sections in the
> xquery spec, but I've found solution.

>From an XQuery Data Model point of view, CDATA sections and "regular" text
nodes are the same thing.  CDATA is just another representation for the
same value.  Hence, you can't express what you want in XQuery.

It shouldn't make any difference anyway.  The only advantage that a CDATA
section could have is that it might please your eyes.  Every XML Parser
should should handle a CDATA section the same way as its equivalent text
node representation.

But there may still be a way to get what you want.  The XQuery
Serialization specification suggests implementors to provide a
`cdata-section-elements' parameter, which may allow for a setting that
results in the output that you look for.  You'll first have to check though
whether your implementation supports the parameter at all.

Jens

--
Jens Teubner
IBM T.J. Watson Research Center
19 Skyline Drive, Hawthorne, NY 10532
+1 914 784 7179



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.