1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00
samba-mirror/docs/xslt/strip-references.xsl
Jelmer Vernooij 313a0c688d Split up main stylesheet (necessary for new examples code)
(This used to be commit f74d0fc39ac4570d378ff797b260851fe9da34b6)
2008-04-23 08:46:45 -05:00

43 lines
1.2 KiB
XML

<?xml version='1.0'?>
<!-- Removes particular (unuseful for the book) elements from references -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.1">
<xsl:template match="reference/refentry/refsect1">
<xsl:if test="title!='VERSION' and title!='AUTHOR'">
<xsl:element name="refsect1">
<xsl:if test="@id!=''">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:template match="reference/refentry">
<xsl:element name="section">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:element name="title">
<xsl:value-of select="refmeta/refentrytitle"/>
</xsl:element>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="reference/refentry/refmeta"/>
<xsl:template match="reference/refentry/refnamediv"/>
<xsl:template match="reference">
<xsl:element name="appendix">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>