Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Help with grouping >Thread Next - Re: Help with grouping Re: Help with groupingTo: NULL Date: 12/7/2008 7:33:00 PM fj wrote:
> I don't have much time to search the right solution, I really need your help
> with this one, not very familiar with xslt.
That is not really a grouping problem I think, you just need to pull in
the information from the different sections:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="Inbound">
<Outbound>
<xsl:apply-templates select="header/record"/>
</Outbound>
</xsl:template>
<xsl:template match="record">
<Order>
<xsl:copy-of select="id | desc"/>
<details>
<xsl:apply-templates select="/Inbound/detail/record[headerid =
current()/id]" mode="det"/>
</details>
<specialInstruction>
<xsl:value-of
select="/Inbound/specialInstruction/record[headerid = current()/id]/desc"/>
</specialInstruction>
</Order>
</xsl:template>
<xsl:template match="record" mode="det">
<xsl:copy>
<detailsid>
<xsl:value-of select="concat(headerid, '-', position())"/>
</detailsid>
<xsl:copy-of select="quantity | destination"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
