Created
October 3, 2009 21:20
-
-
Save LeifW/200890 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> | |
<xsl:output indent="yes"/> | |
<xsl:param name="file" select="'example.csv'"/> | |
<xsl:template match="/"> | |
<xsl:for-each select="tokenize(unparsed-text($file),'\r?\n')"> | |
<row> | |
<xsl:for-each select="tokenize(.,',')"> | |
<item> | |
<xsl:value-of select="."/> | |
</item> | |
</xsl:for-each> | |
</row> | |
</xsl:for-each> | |
</xsl:template> | |
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stylesheet -xmlns:xsl=http://www.w3.org/1999/XSL/Transform -version=2.0 | |
output -indent=yes | |
param file 'example.csv' | |
template / | |
for-each tokenize(unparsed-text($file),'\r?\n') | |
row | |
for-each tokenize(.,',') | |
item | |
value-of . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment