2006-09-25 00:05:33 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<xsl:stylesheet
|
|
|
|
version = "1.0"
|
|
|
|
xmlns = "http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
|
|
|
|
>
|
|
|
|
<xsl:output
|
|
|
|
method = "xml"
|
|
|
|
encoding = "UTF-8"
|
|
|
|
doctype-public = "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
|
|
doctype-system = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
|
|
|
|
indent = "no"
|
|
|
|
media-type = "text/html"
|
|
|
|
/>
|
2007-05-28 03:33:12 +00:00
|
|
|
<xsl:param name="css" select="'styles/plain.css'"/>
|
|
|
|
<xsl:param name="title" select="'Configuration Documentation'"/>
|
2006-09-25 00:05:33 +00:00
|
|
|
|
|
|
|
<xsl:variable name="typeLookup" select="document('../types.xml')" />
|
|
|
|
|
|
|
|
<xsl:template match="/">
|
|
|
|
<html lang="en" xml:lang="en">
|
|
|
|
<head>
|
2007-05-28 03:33:12 +00:00
|
|
|
<title><xsl:value-of select="$title" /> - <xsl:value-of select="/configdoc/title" /></title>
|
2006-09-25 00:05:33 +00:00
|
|
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
2007-05-28 03:33:12 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="{$css}" />
|
2006-09-25 00:05:33 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2007-01-18 02:52:20 +00:00
|
|
|
<div id="library"><xsl:value-of select="/configdoc/title" /></div>
|
2007-05-28 03:33:12 +00:00
|
|
|
<h1><xsl:value-of select="$title" /></h1>
|
2006-11-08 14:21:06 +00:00
|
|
|
<h2>Table of Contents</h2>
|
|
|
|
<ul id="toc">
|
|
|
|
<xsl:apply-templates mode="toc" />
|
|
|
|
</ul>
|
2006-09-25 00:05:33 +00:00
|
|
|
<xsl:apply-templates />
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-11-08 14:21:06 +00:00
|
|
|
<xsl:template match="title" mode="toc" />
|
|
|
|
<xsl:template match="namespace" mode="toc">
|
|
|
|
<xsl:if test="count(directive)>0">
|
|
|
|
<li>
|
|
|
|
<a href="#{@id}"><xsl:value-of select="name" /></a>
|
|
|
|
<ul>
|
|
|
|
<xsl:apply-templates select="directive" mode="toc" />
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="directive" mode="toc">
|
|
|
|
<li><a href="#{@id}"><xsl:value-of select="name" /></a></li>
|
2006-09-25 00:05:33 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
2006-11-08 14:21:06 +00:00
|
|
|
<xsl:template match="title" />
|
|
|
|
|
2006-09-25 00:05:33 +00:00
|
|
|
<xsl:template match="namespace">
|
|
|
|
<xsl:apply-templates />
|
2006-11-08 14:21:06 +00:00
|
|
|
<xsl:if test="count(directive)=0">
|
2006-09-25 00:05:33 +00:00
|
|
|
<p>No configuration directives defined for this namespace.</p>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="namespace/name">
|
2006-11-08 14:21:06 +00:00
|
|
|
<h2 id="{../@id}"><xsl:value-of select="." /></h2>
|
2006-09-25 00:05:33 +00:00
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="namespace/description">
|
|
|
|
<div class="description">
|
|
|
|
<xsl:copy-of select="div/node()" />
|
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="directive">
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="directive/name">
|
2007-06-24 22:22:00 +00:00
|
|
|
<xsl:apply-templates select="../aliases/alias" mode="anchor" />
|
2006-11-12 02:59:36 +00:00
|
|
|
<h3 id="{../@id}"><xsl:value-of select="../@id" /></h3>
|
2006-09-25 00:05:33 +00:00
|
|
|
</xsl:template>
|
2007-06-24 22:22:00 +00:00
|
|
|
<xsl:template match="alias" mode="anchor">
|
|
|
|
<a id="{.}"></a>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- Do not pass through -->
|
|
|
|
<xsl:template match="alias"></xsl:template>
|
|
|
|
|
2006-09-25 00:05:33 +00:00
|
|
|
<xsl:template match="directive/constraints">
|
|
|
|
<table class="constraints">
|
|
|
|
<xsl:apply-templates />
|
|
|
|
<!-- Calculated other values -->
|
2007-05-28 02:20:55 +00:00
|
|
|
<xsl:if test="../descriptions/description[@file]">
|
|
|
|
<tr>
|
|
|
|
<th>Used by:</th>
|
|
|
|
<td>
|
|
|
|
<xsl:for-each select="../descriptions/description">
|
|
|
|
<xsl:if test="position()>1">, </xsl:if>
|
|
|
|
<xsl:value-of select="@file" />
|
|
|
|
</xsl:for-each>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</xsl:if>
|
2007-06-24 22:22:00 +00:00
|
|
|
<xsl:if test="../aliases/alias">
|
|
|
|
<xsl:apply-templates select="../aliases" mode="constraints" />
|
|
|
|
</xsl:if>
|
2006-09-25 00:05:33 +00:00
|
|
|
</table>
|
|
|
|
</xsl:template>
|
2007-06-24 22:22:00 +00:00
|
|
|
<xsl:template match="directive/aliases" mode="constraints">
|
|
|
|
<th>Aliases:</th>
|
|
|
|
<td>
|
|
|
|
<xsl:for-each select="alias">
|
|
|
|
<xsl:if test="position()>1">, </xsl:if>
|
|
|
|
<xsl:value-of select="." />
|
|
|
|
</xsl:for-each>
|
|
|
|
</td>
|
|
|
|
</xsl:template>
|
2006-09-25 00:05:33 +00:00
|
|
|
<xsl:template match="directive//description">
|
|
|
|
<div class="description">
|
|
|
|
<xsl:copy-of select="div/node()" />
|
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="constraints/type">
|
|
|
|
<tr>
|
|
|
|
<th>Type:</th>
|
|
|
|
<td>
|
|
|
|
<xsl:variable name="type" select="text()" />
|
|
|
|
<xsl:attribute name="class">type type-<xsl:value-of select="$type" /></xsl:attribute>
|
|
|
|
<xsl:value-of select="$typeLookup/types/type[@id=$type]/text()" />
|
2006-11-12 02:59:36 +00:00
|
|
|
<xsl:if test="@allow-null='yes'">
|
|
|
|
(or null)
|
|
|
|
</xsl:if>
|
2006-09-25 00:05:33 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="constraints/allowed">
|
|
|
|
<tr>
|
|
|
|
<th>Allowed values:</th>
|
|
|
|
<td>
|
|
|
|
<xsl:for-each select="value"><!--
|
|
|
|
--><xsl:if test="position()>1">, </xsl:if>
|
|
|
|
"<xsl:value-of select="." />"<!--
|
|
|
|
--></xsl:for-each>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="constraints/default">
|
|
|
|
<tr>
|
|
|
|
<th>Default:</th>
|
|
|
|
<td><pre><xsl:value-of select="." xml:space="preserve" /></pre></td>
|
|
|
|
</tr>
|
|
|
|
</xsl:template>
|
|
|
|
|
2006-09-10 02:02:40 +00:00
|
|
|
</xsl:stylesheet>
|