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

RE: XSLT and comma's in XML data

Subject: RE: XSLT and comma's in XML data
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Thu, 17 Feb 2005 10:03:10 +0000
xslt comma
What I think that Michael Kay meant was that you should require of your input csv to have each field deliminated by quotes, that is:

"field one","field 2, containing a comma","field 3",
"etcetera",", and etcetera (also with a comma)","end"

Then you would be able to parse the CSV searching not for a comma (,) but for quote comma quote (",").

If you have no way of changing the input, you will have a hard time at it. How would any mechanism then be able to see any difference between a comma separating two fields, and a comma which is included in a given field.

Regards,
Ragulf Pickaxe :-)


----Original Message Follows---- From: "Ian Vaughan" <i.vaughan@xxxxxxxxxxxxxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: XSLT and comma's in XML data Date: Thu, 17 Feb 2005 09:31:44 -0000

The data in the XML does not contain quotes it just contains a comma on
some fields such as

Bank,Street

Which is interfering with the following XSLT

<xsl:template match="BuildingRecord//* | apd:*/* ">
<xsl:if test="position() &gt; 1 ">,</xsl:if>
<xsl:value-of select="normalize-space(.)"/> </xsl:template>

And instead of Bank, Street being entered under Address 1 it is split.
So Bank goes under Address 1 and Street under Address 2 which corrupts
layout of the generated CSV file

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


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.