Subject: Re: [xsl] Generating book index via attributes... From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Fri, 09 Apr 2010 19:54:57 +0200 |
(Using XMLSpy Enterprise Edition version 2010 rel. 2, xsl 1.0)
<?xml version="1.0" encoding="utf-8"?> <docroot> <chapter> <title> Brakes <indxref refs1="Brakes"/> </title> <subchapter> <title> Drum type Brakes <indxref refs1="Brakes" refs2="drum"/> </title> <para>stuff... <indxref refs1="Brakes" refs2="drum" refs3="diagram"/> </para> ...
I need to generate an index. For now, I just need a hierarchical listing.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:key name="refs1Key" match="indxref/@refs1" use="."/>
<xsl:key name="refs2Key" match="indxref/@refs2" use="concat(../@refs1, '|', .)"/>
<xsl:key name="refs3Key" match="indxref/@refs3" use="concat(../@refs1, '|', ../@refs2, '|', .)"/>
<xsl:template match="@refs3" mode="group"> <br/>........<xsl:value-of select="." /><br/> </xsl:template>
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Generating book index via, Martin Honnen | Thread | Re: [xsl] Generating book index via, Dave Carvell |
Re: [xsl] Generating book index via, Martin Honnen | Date | Re: [xsl] Create Table, bernie bonn |
Month |