1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
<?xml version='1.0'?>
<!--
$Id$
Author: Scott Smedley
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:import href="docbook-xsl/html/docbook.xsl"/>
<!-- output in utf8-format -->
<xsl:output method="html" encoding="UTF-8" indent="no"/>
<!-- twdt = The Whole Damn Thing ... ie. everything on a single page -->
<xsl:param name="twdt" select="''"/>
<xsl:param name="header.file" select="'../header.html'"/>
<xsl:param name="footer.file" select="'../footer.html'"/>
<!-- fvwmref -->
<xsl:template match="fvwmref">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="($twdt = 1) and not (@mod)">
<xsl:text>#</xsl:text>
<xsl:choose>
<xsl:when test="@opt">
<xsl:choose>
<xsl:when test="@cmd">
<xsl:value-of select="@cmd"/>
<xsl:text>_</xsl:text>
<xsl:value-of select="@opt"/>
</xsl:when>
<!-- mod=".." opt=".." isn't used. -->
<xsl:otherwise>
<xsl:value-of select="@opt"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@cmd">
<xsl:value-of select="@cmd"/>
</xsl:when>
<xsl:when test="@mod">
<xsl:value-of select="@mod"/>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@cmd">
<xsl:text>../commands/</xsl:text>
<xsl:value-of select="@cmd"/>
</xsl:when>
<xsl:when test="@mod">
<xsl:text>../modules/</xsl:text>
<xsl:value-of select="@mod"/>
</xsl:when>
<xsl:when test="@sect">
<xsl:text>../fvwm/fvwm.man</xsl:text>
<!-- not splitting into separate sections for now.
<xsl:value-of select="@sect"/>
-->
</xsl:when>
<!-- anything else should be an error -->
</xsl:choose>
<xsl:text>.html</xsl:text>
<xsl:if test="@opt">
<xsl:text>#</xsl:text>
<xsl:choose>
<xsl:when test="@cmd">
<xsl:value-of select="@cmd"/>
<xsl:text>_</xsl:text>
</xsl:when>
<xsl:when test="@mod">
<xsl:value-of select="@mod"/>
<xsl:text>_</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:value-of select="@opt"/>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@sect">
<xsl:value-of select="@name"/>
</xsl:when>
<xsl:when test="@opt">
<xsl:value-of select="@opt"/>
</xsl:when>
<xsl:otherwise>
<xsl:if test="@cmd">
<xsl:value-of select="@cmd"/>
</xsl:if>
<xsl:if test="@mod">
<xsl:value-of select="@mod"/>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</a>
</xsl:template>
<!-- fvwmopt -->
<xsl:template match="fvwmopt">
<a>
<xsl:attribute name="name">
<xsl:choose>
<xsl:when test="@cmd">
<xsl:value-of select="@cmd"/>
</xsl:when>
<xsl:when test="@mod">
<xsl:value-of select="@mod"/>
</xsl:when>
</xsl:choose>
<xsl:text>_</xsl:text>
<xsl:value-of select="@opt"/>
</xsl:attribute>
</a>
<font class="fvwmopt"><xsl:value-of select="@opt"/></font>
</xsl:template>
<xsl:template name="user.header.content">
<xsl:variable name="codefile" select="document($header.file,/)"/>
<xsl:copy-of select="$codefile/*/node()"/>
</xsl:template>
<xsl:template name="user.footer.content">
<xsl:variable name="codefile" select="document($footer.file,/)"/>
<xsl:copy-of select="$codefile/*/node()"/>
</xsl:template>
</xsl:stylesheet>
|