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(_dot_)vaughan(_at_)neath-porttalbot(_dot_)gov(_dot_)uk>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] 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() > 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/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--