Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - Re: [xsl] Getting sibling nodes from unique values [Thread Next] Re: [xsl] Getting sibling nodes from unique valuesTo: xsl-list@-----.------------.--- Date: 8/4/2009 5:35:00 PM Sweet!
That will teach me to stop overcomplicating things!
Thanks a TON!!
This is the xsl that i ended up with...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:for-each-group select="Root/row" group-by="company">
<xsl:result-document href="{current-grouping-key()}.xml">
<Root>
<xsl:copy-of select="current-group()"/>
</Root>
</xsl:result-document>
</xsl:for-each-group>
</xsl:template>
</xsl:stylesheet>
On Tue, Aug 4, 2009 at 10:27 AM, Martin Honnen<Martin.Honnen@g...> wrote:
> Mike Ferrari wrote:
>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> version="2.0">
>> <xsl:output method="text"/>
>> <xsl:template match="/">
>> <xsl:for-each select="distinct-values(//company)">
>
> Use
> <xsl:for-each-group select="Root/row" group-by="company">
> <xsl:result-document href="{current-grouping-key()}.xml">
> <Root>
> <xsl:copy-of select="current-group()"/>
> </Root>
> </xsl:result-document>
> </xsl:for-each-group>
>
>
>
>
> --
>
> Martin Honnen
> http://msmvps.com/blogs/martin_honnen/
>
> --~------------------------------------------------------------------
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--
>
>
--
/dev/mike0
http://www.mikeferrari.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
