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

[xsl] regex stuff, last character being chomped

Subject: [xsl] regex stuff, last character being chomped
From: "Ihe Onwuka ihe.onwuka@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Oct 2014 09:47:57 -0000

Transforming some text like this which is a director and movie title
separated by a tab delimiter.

&Oumlzkul, Ahmet Salih Ii (2013)


  <xsl:template name="main">
     <!-- process a line of text at a time -->
       <!-- deal with tab delimiter -->
       <xsl:variable name="lineSplit"
       <xsl:if test="count($lineSplit) eq 2">
           <xsl:value-of select="normalize-space($lineSplit[1])"/>
         <xsl:value-of select="$lineSplit[last()]"/>

and am getting

   <director>&amp;Oumlzkul, Ahmet Salih</director>
   <movie>Ii (2013</movie>

i.e the closing bracket of what should be the movie text node is missing.

Current Thread