diff options
author | Patrick McCarty <patrick.mccarty@linux.intel.com> | 2012-06-12 14:05:47 -0700 |
---|---|---|
committer | Patrick McCarty <patrick.mccarty@linux.intel.com> | 2012-06-12 14:58:00 -0700 |
commit | 0ebc96393cd7cd5c861276ae733307bd7b8d87f7 (patch) | |
tree | 899f86030089e8daa5eaf48af5b8b5b7780998d6 /website/xbel.xsl | |
parent | 7f26f4160c974d34117c14272d3e4f56a471e8f1 (diff) | |
download | docbook-xsl-master.tar.gz docbook-xsl-master.tar.bz2 docbook-xsl-master.zip |
Required package for building systemd man pages.
Change-Id: I0a200a2340a5aea24898b428b8e9b55da57e3e5b
Signed-off-by: Patrick McCarty <patrick.mccarty@linux.intel.com>
Diffstat (limited to 'website/xbel.xsl')
-rw-r--r-- | website/xbel.xsl | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/website/xbel.xsl b/website/xbel.xsl new file mode 100644 index 0000000..ec9873c --- /dev/null +++ b/website/xbel.xsl @@ -0,0 +1,114 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0'> + +<!-- ******************************************************************** + $Id: xbel.xsl 6910 2007-06-28 23:23:30Z xmldoc $ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- ==================================================================== --> + +<xsl:output method="xml"/> + +<!-- ==================================================================== --> + +<xsl:template match="xbel"> + <ul> + <xsl:apply-templates/> + </ul> +</xsl:template> + +<!-- Only partial support for xbel elements --> +<xsl:template match="xbel/info|xbel/title|xbel/desc| + xbel/alias|xbel/separator"> + <!-- No op --> +</xsl:template> + +<xsl:template match="folder"> + <li> + <xsl:apply-templates select="title"/> + <ul> + <xsl:apply-templates select="folder|bookmark"/> + </ul> + </li> +</xsl:template> + +<xsl:template match="folder/title"> + <b><xsl:apply-templates/></b> +</xsl:template> + +<xsl:template match="bookmark"> + <li> + <a href="{@href}" target="_top"> + <xsl:apply-templates select="title"/> + </a> + </li> +</xsl:template> + +<xsl:template match="bookmark/title"> + <xsl:apply-templates/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="xbel" mode="dynamic"> + <ul> + <xsl:apply-templates mode="dynamic"/> + </ul> +</xsl:template> + +<xsl:template match="info" mode="dynamic"> +</xsl:template> + +<xsl:template match="folder" mode="dynamic"> + <li> + <xsl:apply-templates select="title" mode="dynamic"/> + <ul style="display:none" id="{@id}"> + <xsl:apply-templates select="folder|bookmark" mode="dynamic"/> + </ul> + </li> +</xsl:template> + +<xsl:template match="folder/title" mode="dynamic"> + <b> + <span> + <xsl:choose> + <xsl:when test="../@id"> + <xsl:attribute name="onClick"> + <xsl:text>toggleList('</xsl:text> + <xsl:value-of select="../@id"/> + <xsl:text>')</xsl:text> + </xsl:attribute> + <xsl:attribute name="class">exlist</xsl:attribute> + <xsl:attribute name="style">color: blue</xsl:attribute> + <xsl:apply-templates mode="dynamic"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="dynamic"/> + </xsl:otherwise> + </xsl:choose> + </span> + </b> +</xsl:template> + +<xsl:template match="bookmark" mode="dynamic"> + <li> + <a href="{@href}" target="_top"> + <xsl:apply-templates select="title" mode="dynamic"/> + </a> + </li> +</xsl:template> + +<xsl:template match="bookmark/title" mode="dynamic"> + <xsl:apply-templates mode="dynamic"/> +</xsl:template> + +<!-- ==================================================================== --> + +</xsl:stylesheet> |