xsl-list
[Top] [All Lists]

RE: [xsl] Multi-grouping with keys (back of book index)

2006-10-22 05:55:43
Thanks for the help. 

Michael, your suggestion works. It now groups according to Letter
(substring(@name,1,1)). I am having trouble grouping in the second level
(@name). For example if xml document 1 has a @name = "GMM" and xml document
2 has a @name = "GMM" it lists them under 'G', but separate e.g.

G

GMM
- Ferry Flight
- Policy

GMM
- Fueling

I will continue to work on it. My thought is I have to rework the Second
<for-each-group>

<xsl:for-each-group select="current-group()" group-by="@name">
                                                <span style="color:blue;">
                                                        <xsl:value-of
select="current-grouping-key()"/>
                                                </span>
                                                <xsl:for-each
select="current-group()">
                                                        <xsl:sort
select="."/>
                                                        <ul>
                                                                <span
style="font-size:x-small;">
                                                                        <a
href="{'#'}{$book}">
        
<xsl:value-of select="."/>
                                                                        </a>
                                                                </span>
                                                        </ul>
                                                </xsl:for-each>
                                        </xsl:for-each-group>

Thanks for the help.

Phil V

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Sunday, October 22, 2006 8:47 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Multi-grouping with keys (back of book index)

May be this is probably:
<xsl:copy-of select="document('{.}')//indexterm" />

No, you never use curly braces inside an XPath expression. You just want

document(.)//indexterm

Michael Kay
http://www.saxonica.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(_at_)lists(_dot_)mulberrytech(_dot_)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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--