xsl-list
[Top] [All Lists]

Re: [xsl] Need help with tokenize functionality in XSLT 1.0

2020-08-20 11:52:21
Nice, a recursive template with a parameter ;-)

Cheers
Leo



<xsl:template match="Payment">
 <xsl:param name="details" select="invoiceDetails"/>
 <xsl:variable name="car" select="substring-before($details,';')"/>
 <xsl:variable name="cdr" select="substring-after($details,';')"/>
 <Order>
  <OrderNumber><xsl:value-of 
select="substring-before($car,'#')"/></OrderNumber>
  <Ammount><xsl:value-of select="substring-after($car,'#')"/></Ammount>
 </Order>
 <xsl:if test="contains($cdr,'#')">
  <xsl:apply-templates select=".">
   <xsl:with-param name="details" select="$cdr"/>
  </xsl:apply-templates>
 </xsl:if>
</xsl:template>

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>