Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] grouping list items by attribute

From: Jon Gorman <jonathan.gorman@--------->
To:
Date: 10/5/2005 2:19:00 PM
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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent