[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: change xslt processing order

Subject: Re: change xslt processing order
From: Navin Patel <navin98@xxxxxxxxx>
Date: Sun, 2 Oct 2011 11:43:05 +0100
Re:  change xslt processing order
 Ken,

Can I tweak your xsl to get my desired output shown below or do I need
to use the grouping method,

Thanks

Navin

Expected out:
JD0002210800004322
7255
044375530
JD0002210800004323
7256
044375531
JD0002210800004324
JD0002210800004325
7257
044375532


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method='text'/>


<xsl:key name="parcelDetailsForAddress" match="DeliveryAddress"
         use="following-sibling::Parcel[1]/@PARCEL_NO"/>
<xsl:key name="parcelDetailsForConsignment" match="Consignment"
         use="following-sibling::Parcel[1]/@PARCEL_NO"/>


 <xsl:variable name='newline'>
 <xsl:text>
</xsl:text>
 </xsl:variable>
<xsl:template match="MR23030B">
<xsl:apply-templates select="Parcel"/>
</xsl:template>


<xsl:template match="Parcel">
<xsl:value-of select="@PARCEL_NO"/>
<xsl:value-of select="$newline"/>
<xsl:apply-templates select="key('parcelDetailsForAddress',@PARCEL_NO)"/>
<xsl:apply-templates select="key('parcelDetailsForConsignment',@PARCEL_NO)"/>
</xsl:template>


<xsl:template match="DeliveryAddress">
<xsl:value-of select="@BRANCH_CODE"/>
<xsl:value-of select="$newline"/>
</xsl:template>


<xsl:template match="Consignment">
<xsl:value-of select="@ACNT_NO"/>
<xsl:value-of select="$newline"/>
</xsl:template>


</xsl:stylesheet>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.