[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

Yves Forkl Y.Forkl at srz.de
Mon Oct 20 13:34:24 PDT 2008


  Whitespace problem in CSV-like output
John Snelson wrote:

> Well, DataDirect's method seems to require you to construct a custom XML 
> structure, and specify a implementation specific serialization method. 
> Your current method requires that you create some strings, and join them 
> with string-join(). I'm not sure there's a lot of difference between the 
> two.

You are right that both approaches don't have what I was looking for: A 
pre-cooked solution for writing CSV rows and cells. But that's OK, now I 
have what I need and at the same time I have learned some useful things.


> I agree that using a space as a separator between atomic items when 
> outputting them can be confusing - but at other times it's actually very 
> useful. It's now a widespread practice in both XQuery and XSLT 2.0, so I 
> don't know how much it could be changed.

That's completely true. I'm familiar (and happy) with the space 
insertion rules of XSLT 2.0 (if I may use this non-technical term here), 
but still have to wrap my head around the way XQuery serializes the 
results of multiple iterations.


> It would seem to be a bug if it drops the last line feed in the output.

Unfortunately not: Of course, string-join's separator character (here: 
line feed) is by definition not to be appended after the last item. 
That's why changing the functions doesn't work out.

   Yves


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.