1 <?xml version="1.0" encoding="utf-8"?>
\r
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
\r
4 xmlns:fn="http://senf.berlios.de/xml/Extensions"
\r
5 xmlns:exsl="http://exslt.org/common"
\r
6 xmlns:str="http://exslt.org/strings"
\r
7 extension-element-prefixes="str fn exsl"
\r
10 <xsl:include href="functions.xsl"/>
\r
12 <xsl:output method="html"/>
\r
13 <xsl:strip-space elements="*"/>
\r
14 <xsl:param name="title" select="''"/>
\r
16 <xsl:template match="/">
\r
17 <h1><xsl:value-of select="$title"/></h1>
\r
18 <xsl:apply-templates/>
\r
21 <xsl:template match="xreflist">
\r
22 <xsl:if test="string(preceding::xreflist[1]/@module)!=string(@module)">
\r
23 <xsl:if test="preceding::xreflist">
\r
26 <h2>The <xsl:element name="a">
\r
27 <xsl:attribute name="href">../../<xsl:value-of select="@module"/>/doc/html/index.html</xsl:attribute>
\r
28 <xsl:value-of select="@module"/>
\r
29 </xsl:element> module</h2>
\r
31 <xsl:element name="dl">
\r
32 <xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute>
\r
33 <dt><h3><xsl:value-of select="translate(@type,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> items</h3></dt>
\r
34 <xsl:apply-templates/>
\r
40 <fn:match>_1_1</fn:match>
\r
41 <fn:replace>_2</fn:replace>
\r
45 <xsl:variable name="nsquote" select="document('')//fn:nsquote/fn:replacement"/>
\r
47 <xsl:template match="compound">
\r
48 <!-- Yuck ... I HATE this .. why doesn't xsltproc support XPath 2.0 ... grmpf -->
\r
49 <xsl:variable name="quoted">
\r
50 <xsl:apply-templates select="str:replace(@id,$nsquote/fn:match,$nsquote/fn:replace)"/>
\r
52 <xsl:variable name="anchor" select="substring-after($quoted,'_1')"/>
\r
53 <xsl:variable name="file">
\r
54 <xsl:apply-templates select="str:replace(substring($quoted,1,string-length($quoted) - number(boolean($anchor))*2 - string-length($anchor)),$nsquote/fn:replace,$nsquote/fn:match)"/>
\r
56 <xsl:variable name="sep" select="substring('#',2-number(boolean($anchor)))"/>
\r
58 <xsl:element name="a">
\r
59 <xsl:attribute name="href">../../<xsl:value-of select="ancestor::xreflist/@module"/>/doc/html/<xsl:value-of select="$file"/>.html<xsl:value-of select="$sep"/><xsl:value-of select="$anchor"/></xsl:attribute>
\r
60 <b><xsl:value-of select="@name"/></b>
\r
64 <xsl:apply-templates/>
\r
68 <xsl:template match="item">
\r
69 <p><xsl:apply-templates/></p>
\r