[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] unparsed-text and normalize-space when parsing CSV files


Subject: Re: [xsl] unparsed-text and normalize-space when parsing CSV files
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Dec 2014 21:24:37 -0000

At 2014-12-05 19:36 +0000, Hank Ratzesberger xml@xxxxxxxxxxxx wrote:
I was trying to parse a csv file.

Perhaps you can get some clues from:


http://www.CraneSoftwrights.com/resources/#csv

That runs either as a standalone stylesheet for command-line use or as an imported stylesheet to be called.

The problem was that I was defining a variable for the newline, which
I expected would match the native system:

<xsl:variable name="nl">
    <xsl:text>
</xsl:text>
</xsl:variable>

That won't match the native system because the end-of-line sequence of the stylesheet is translated into &#xa; on the way into the parsed XDM tree and so only &#xa; will be put out when done.


I hope this helps.

. . . . . . Ken


-- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


--- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com


Current Thread
Keywords