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

Re: Getting sibling nodes from unique values

Subject: Re: Getting sibling nodes from unique values
From: Mike Ferrari <mikeferrari8@xxxxxxxxx>
Date: Tue, 4 Aug 2009 12:34:20 -0500
Re:  Getting sibling nodes from unique values
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@xxxxxx> 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/
>
>



--
/dev/mike0

http://www.mikeferrari.com

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.