xsl-list
[Top] [All Lists]

RE: XSLT and comma's in XML data

2005-02-17 08:44:46
If you look at the first example output this is how it is coming back


UniqueRecordID, 2434,
RegistrationNumber, 0203,
RegisteredName, Bloggs,
Address1, Bank
Address2, Street
Address3, 
Address4,
PostCode, Town
DateComplete, TR43 7TY
DescriptionOfWorkItems, 20/01/2005,Shower,Dwelling house,


As you can see because the data for the Address 1 Bank,Street had a
comma it inserts Bank into Address 1 and Street into Address 2 thus
making other fields hold incorrect data such as PostCode, DateComplete
and Description of Work Items


I would like to generate Bank,Street in the CSV as it is in the XML file
but ensure that it matches the relevant heading in the example above
Address 1.





-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk] 
Sent: 17 February 2005 10:30
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] XSLT and comma's in XML data


Which is interfering with the following XSLT

nothing. The comma acts just like any other character in XSLT.
What Michael meant is that you must check what output you want to
generate in this case.
If you have comma separated fields but one of the fields contains a
comma do you want to generate ... ,Bank\, Street, ...
or
... ,"Bank, Street", ...
or what?
Currently you generate
... ,Bank, Street, ...
which isn't a problem for XSLT but causes errors in your subsequent
application.

We can't help as we don't know what conventions your program needs to
get a comma into a field.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. For more information on a proactive anti-virus
service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--




--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>