Subject: Re: [xsl] Output flat file results 2 nodes at a time? From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Wed, 09 May 2007 17:00:22 +0200 |
(ah, I see that David beat me to it with a much shorter approach ;)
Nah, that was the long approach, the shorter approach is just to use a single xpath 2 expression:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="shipment">
<xsl:value-of select="' REC1*',header/string(shipmentId),
detail/po/(if(position() mod 2 = 1) then ' REC2*' else '*', string()),
detail/containers/box/(if(position() mod 4 = 1) then ' REC3*' else '*',string())"
separator=""/>
</xsl:template>
</xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Output flat file results , David Carlisle | Thread | RE: [xsl] Output flat file results , Michael Kay |
Re: [xsl] Output flat file results , David Carlisle | Date | RE: [xsl] Output flat file results , Michael Kay |
Month |