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

Whitespace problem in CSV-like output

Andrew Welch andrew.j.welch at gmail.com
Mon Oct 20 12:28:24 PDT 2008


  Whitespace problem in CSV-like output
> Trying to understand why it is working (it does, tested it with Saxon):
> Appending the line feed as a text node seems to influence on the
> interpretation of the other items returned that are now seen as text nodes,
> too, (and thus serialized as immediately adjacent strings) rather than as
> strings that need to be separated with spaces.

Adjacent text nodes are merged into a single text node... so a
sequence of text nodes becomes a single text node, requiring no
separators.

For example:

"//text()" will ultimately return a single text node

"for $x in //text() return xs:string($x)" will return sequence of
strings separated by a space (provided count($x) > 1)



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/


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-2007 All Rights Reserved.