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

Subject: RE: [xsl] Multi-grouping with keys (back of book index)
From: "Philip Vallone" <philip.vallone@xxxxxxxxxxx>
Date: Sun, 22 Oct 2006 08:55:18 -0400
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@xxxxxxxxxxxx] 
Sent: Sunday, October 22, 2006 8:47 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
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/

Current Thread