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

Re: Re: Grouping by attribute

Subject: Re: Re: Grouping by attribute
From: Lajos Joo <lajosjoo@xxxxxxxxx>
Date: Wed, 21 Oct 2009 08:57:38 -0700 (PDT)
Re:  Re: Grouping by attribute
Great idea. However better than mine.
I have just changed the if to choose
like this:

<xsl:template match="node()">
  <xsl:param name="cn"
select="/.."/>
  <xsl:choose>
    <xsl:when test="descendant-or-self::node()
intersect $cn">
      <xsl:copy>
        <xsl:apply-templates select="@*|
node()">
          <xsl:with-param name="cn" select="$cn"/>
</xsl:apply-templates>
      </xsl:copy>
    </xsl:when>
    <xsl:otherwise>
<xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
</xsl:otherwise>
  </xsl:choose>
</xsl:template>

--- On Wed, 10/21/09, Martin
Honnen <Martin.Honnen@xxxxxx> wrote:


>   <xsl:template match="node()"
mode="m1">
>     <xsl:param name="cn"/>
>     <xsl:if
test="descendant-or-self::node()
> intersect $cn">
>       <xsl:copy>
>      
  <xsl:apply-templates
> select="@*"/>
>         <xsl:apply-templates
>
select="node()" mode="m1">
>           <xsl:with-param
> name="cn"
select="$cn"/>
>         </xsl:apply-templates>
>       </xsl:copy>
>    
</xsl:if>
>   </xsl:template>

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.