I want to write an XSLT that will read a CSV file and transform the data into CDATA tag
sample input file
Col1,Col2,Col3 apple,mango,orange
required output
<![CDATA[apple|mango|orange]]>
Something like this:
<xsl:stylesheet version="2.0"...> <xsl:template name="main"> <out> <xsl:for-each select="tokenize(unparsed-text('input.csv'), '\n')"> <line> <xsl:value-of select="tokenize(., ',')" separator="|"/> </line> </xsl:for-each> </out> </xsl:template> <xsl:output cdata-section-elements="line"/> </xsl:stylesheet>
Something like this: