View Single Post
  #1 (permalink)  
Old June 8th, 2006, 08:11 AM
kapy_kal kapy_kal is offline
Registered User
 
Join Date: Mar 2006
Location: , , Canada.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default <xsl:for-each select="tokenize($indoc,'&#xA;')">

I am getting an unexpected behavior with the tokenize() function or perhaps this is what the output ought to be. The following stylesheet:
<xsl:variable name="indoc" select="unparsed-text('input.txt','ISO-8859-1')"/>
 <doc>
  <xsl:for-each select="tokenize($indoc,'#xA;')">
   <inline>
     <xsl:value-of select="."/>
   </inline>
  </xsl:for-each>
</doc>
produces something like this:
<doc >
 <inline>10 01 1001 23 23
     11 01 1001 24 24
     12 01 1001 25 25
 </inline>
</doc>
instead of (what I would expect):
<doc >
 <inline>10 01 1001 23 23</inline>
 <inline>11 01 1001 24 24</inline>
 <inline>12 01 1001 25 25</inline>
</doc>
Is there something I am missing?
Thanks,
Francine.