Subject: Re: [xsl] Re: Need help with tokenize functionality in XSLT 1.0 From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 19 Aug 2020 16:35:00 -0000 |
So last century we's have done <xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes"/> <xsl:template match="Payments"> <Orders> <xsl:apply-templates/> </Orders> </xsl:template> <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:stylesheet> $ saxon9 pay.xml pay.xsl <?xml version="1.0" encoding="UTF-8"?> <Orders> <Order> <OrderNumber>order1</OrderNumber> <Ammount>amt1</Ammount> </Order> <Order> <OrderNumber>order2</OrderNumber> <Ammount>amt2</Ammount> </Order> </Orders>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Need help with tokenize f, Prady Prady prady.ch | Thread | Re: [xsl] Re: Need help with tokeni, Christophe Marchand |
[xsl] Re: Need help with tokenize f, Prady Prady prady.ch | Date | Re: [xsl] Re: Need help with tokeni, BR Chrisman brchrism |
Month |