Subject: Re: [xsl] Multi level Grouping using xslt1.0 From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Mon, 23 Feb 2009 19:33:13 +0100 |
The requirement is to group by Company, then by Business, then by Department & finally the Account.
The output expected is -
<Message>
<Company>
<Code>491</Code>
<Business>
<Code>0000</Code>
<Department>
<Code>0000</Code>
<Account>30010</Account> </Department>
<Department>
<Code>0001</Code>
<Account>30010</Account> </Department>
</Business>
</Company>
<Company>
<Code>498</Code>
<Business>
<Code>0000</Code>
<Department>
<Code>0000</Code>
<Account>30010</Account>
</Department>
</Business>
<Business>
<Code>0001</Code>
<Department>
<Code>0000</Code>
<Account>30011</Account>
</Department>
</Business>
</Company>
</Message>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:key name="by-company" match="Row" use="Company"/>
<xsl:key name="by-business" match="Row" use="concat(Company, '|', Business)"/>
<xsl:key name="by-department" match="Row" use="concat(Company, '|', Business, '|', Department)"/>
<xsl:template match="Row" mode="account"> <Account> <xsl:value-of select="Account"/> </Account> </xsl:template>
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Multi level Grouping using xs, Bafna, Kamlesh | Thread | Re: [xsl] Multi level Grouping usin, G. Ken Holman |
[xsl] Multi level Grouping using xs, Bafna, Kamlesh | Date | Re: [xsl] Multi level Grouping usin, G. Ken Holman |
Month |