[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Convert XML elements with extended attributes into

Subject: Re: Convert XML elements with extended attributes into CSV
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Sat, 26 May 2001 18:54:31 -0700 (PDT)
x22
Thank you, Jeni.  That's exactly what I needed, the
solution and the advices are most helpful, they are
much appreciated.

On a related note, since the content of Description
attribute could have either comma or double-quote,
double-quotes are needed around the content in CSV
format.

1. To place double-quotes around the content, I read
in the FAQ section Special Characters (under 16.
Character Escaping) that I should able to use '"' with
concat().  But when I tried, I get the error "need
whitespace between attributes".  So I had to use
'&#x22;' instead like:
concat('&#x22;', @Description, '&#x22;,')
Is this the best way to do this? 

2. Since some of descriptions also contains
double-quote, such as 1/2"; the double-quote needs to
be escaped with another double-quote in CSV, so it
would like 1/2"".  To do that, I was trying to use
translate():
translate(@Description, '&#x22;', '&#x22;&#x22;')
But this does NOT seems to work, did I use translate()
incorrectly or there is a better way to do string
replacement?

Much thanks,
Xiaocun

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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