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

Re: grouping list items by attribute

Subject: Re: grouping list items by attribute
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Wed, 5 Oct 2005 09:18:59 -0500
posiition name
Ack, hit the send button a little early, sorry about that Lynn.  For
some reason Gmail occassionally focuses on the Send button and I don't
quite realize it.  In any case, my more complete code "hint"

> ie something like (not tested, and just here to provide some hints )
>
> <xsl:template name="processList">
> <xsl:param name="nodes" />
> <!-- some of your other stuff  and probably need a for loop that
> iterates over all the nodes-->
>
>       <xsl:choose>
>         <xsl:when test="@level &gt;= following-sibling::*[1]/@level">
>                      <xsl:apply-templates
> > select="$nodes/tx.li[1]" mode="in-list"/>
>              <xsl:call-template name="processList">
                <xsl:with-param name="nodes"
select="$nodes/tx.li[posiition() &gt; 1]"/>
</xsl:call-template>

>         </xsl:when>
>         <xsl:when test="@level &lt; following-sibling::*[1]/@level">
>           <xsl:apply-templates
>  select="tx.li[1]" />
<!-- use a variable here to get the value of the position of the next
list item that is of the same level as our current one -->
 <xsl:call-template name="new-list">
<xsl:with-param name="$nodes/tx.li[posiiton() &lt; $nextCurrent and
position() &gt; 1]"/>
</xsl:call-template>
<xsl:call-template name="processList">
   <xsl:with-param name="nodes" select="$nodes/tx.li[posiition() =
$nextCurrent]"/>
   </xsl:call-template>


Sorry about the email snaffu.  Of course, I don't know how great a
help my hints are.


Jon Gorman

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-2007 All Rights Reserved.