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

Converting XSLT 2.0 Group into XSLT 1.0 Muenchian Meth

Subject: Converting XSLT 2.0 Group into XSLT 1.0 Muenchian Method
From: Vincent Ng <vincent.ng@xxxxxxxxxxxxxxxxx>
Date: Wed, 10 Jan 2007 22:47:38 +0800
 Converting XSLT 2.0 Group into XSLT 1.0 Muenchian Meth
Hi,

I would like to implement following XSLT 2.0 XSL (tested working with
Saxon 8.7.3) using XSLT 1.0.
Does anyone know the equivalent XSL using XSLT 1.0?
Basically, I need to transform the source XML by grouping
similiar values in
<VendorNo>,ChargeToCode>,<ShipToCode>,<CustomerPO>,<ReqDate>,<ShipMethod>

I have looked into http://www.jenitennison.com/xslt/grouping/index.xml
and other literature on Muenchian Method under XSLT 1.0. , but could
not figure out how to convert the code. I'll be grateful for any
suggestion. Thanks.

<?xml version='1.0' ?>
<xsl:stylesheet xmlns:a="urn:test-com:IMS:IMS:V0001" version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<cIMSDirectHeaderLine>
<IMSDirect>
<xsl:for-each-group select="a:cIMSDirect/IMSDirect/IMSDirect"
group-by="VendorNo">
<xsl:for-each-group select="current-group()" group-by="ChargeToCode">
<xsl:for-each-group select="current-group()" group-by="ShipToCode">
<xsl:for-each-group select="current-group()" group-by="CustomerPO">
<xsl:for-each-group select="current-group()" group-by="ReqDate">
<xsl:for-each-group select="current-group()" group-by="ShipMethod">
<IMSDirect>
<IMSDirectHeader>
<VendorNo>
<xsl:value-of select="VendorNo"/>
</VendorNo>
<ChargeToCode>
<xsl:value-of select="ChargeToCode"/>
</ChargeToCode>
<ShipToCode>
<xsl:value-of select="ShipToCode"/>
</ShipToCode>
<CustomerPO>
<xsl:value-of select="CustomerPO"/>
</CustomerPO>
<ReqDate>
<xsl:value-of select="ReqDate"/>
</ReqDate>
<ShipMethod>
<xsl:value-of select="ShipMethod"/>
</ShipMethod>
</IMSDirectHeader>
<xsl:for-each select="current-group()">
<IMSDirectLine>
<PartNo>
<xsl:value-of select="PartNo"/>
</PartNo>
<Qty>
<xsl:value-of select="Qty"/>
</Qty>
<PriorityCode>
<xsl:value-of select="PriorityCode"/>
</PriorityCode>
<ControlNo>
<xsl:value-of select="ControlNo"/>
</ControlNo>
<VendorName>
<xsl:value-of select="VendorName"/>
</VendorName>
<Desrp>
<xsl:value-of select="Desrp"/>
</Desrp>
<CustomerPartNo>
<xsl:value-of select="CustomerPartNo"/>
</CustomerPartNo>
<CustomerItemNo>
<xsl:value-of select="CustomerItemNo"/>
</CustomerItemNo>
<SeqNo>
<xsl:value-of select="SeqNo"/>
</SeqNo>
<VendorBlanketPO>
<xsl:value-of select="VendorBlanketPO"/>
</VendorBlanketPO>
<SeriesCode>
<xsl:value-of select="SeriesCode"/>
</SeriesCode>
<ShipFrom>
<xsl:value-of select="ShipFrom"/>
</ShipFrom>
<Filler>
<xsl:value-of select="Filler"/>
</Filler>
</IMSDirectLine>
</xsl:for-each>
</IMSDirect>
</xsl:for-each-group>
</xsl:for-each-group>
</xsl:for-each-group>
</xsl:for-each-group>
</xsl:for-each-group>
</xsl:for-each-group>
</IMSDirect>
</cIMSDirectHeaderLine>
</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.