123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
- <xsl:template match="*|@*|processing-instruction()">
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="sect1[refentry]">
- <xsl:copy>
- <xsl:apply-templates select="title"/>
- <xsl:apply-templates select="refentry">
- <xsl:sort select="refnamediv/refname"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="refsect1[title='May be included in:']/para">
- <xsl:copy>
- <xsl:apply-templates select="literal[not(.=preceding-sibling::literal)]" mode="included">
- <xsl:sort select="."/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="literal" mode="included">
- <xsl:copy-of select="."/>
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:text>.</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>, </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="refsect1[title='Attributes:']/variablelist">
- <xsl:copy>
- <xsl:apply-templates>
- <xsl:sort select="term"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="refsect1[title='Attributes:']/variablelist[not(*)]">
- <para>None.</para>
- </xsl:template>
- </xsl:stylesheet>
|