]> git.lyx.org Git - features.git/blob - lib/docbook/xhtml5/xhtml2xhtml5.xsl
User Guide: add quotes to a PackageOptions command
[features.git] / lib / docbook / xhtml5 / xhtml2xhtml5.xsl
1 <xsl:stylesheet exclude-result-prefixes="d"
2                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 xmlns:d="http://docbook.org/ns/docbook"
4                 xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
5                 version="1.0">
6
7 <xsl:output indent="no" method="xml"/>
8
9 <xsl:namespace-alias stylesheet-prefix="xslo" result-prefix="xsl"/>
10
11 <xsl:template match="node()|@*">
12     <xsl:copy>
13       <xsl:apply-templates select="@*"/>
14       <xsl:apply-templates/>
15    </xsl:copy>
16 </xsl:template>
17
18 <xsl:template match="xsl:output">
19   <xsl:comment>Same as xhtml but with doctypes removed from xsl:output </xsl:comment>
20   <xsl:text>&#10;</xsl:text>
21   <xsl:comment>and including from ../xhtml directory </xsl:comment>
22   <xsl:text>&#10;</xsl:text>
23   <xslo:output method="xml" encoding="UTF-8" indent="no"/>
24 </xsl:template>
25
26 <xsl:template match="xsl:include/@href">
27   <xsl:choose>
28     <xsl:when test="starts-with(., '../')">
29       <xsl:copy-of select="."/>
30     </xsl:when>
31     <xsl:otherwise>
32       <xsl:attribute name="href">
33         <xsl:value-of select="concat('../xhtml/', .)"/>
34       </xsl:attribute>
35     </xsl:otherwise>
36   </xsl:choose>
37 </xsl:template>
38
39 <xsl:template match="comment()
40              [starts-with(string(.), 'This file was created automatically')]">
41   <xsl:text>&#10;</xsl:text>
42   <xsl:comment>This file was created automatically by xhtml2xhtml5.xsl from the xhtml stylesheet.</xsl:comment>
43   <xsl:text>&#10;</xsl:text>
44 </xsl:template>
45
46 <xsl:template match="comment()
47              [starts-with(string(.), 'from the HTML stylesheets')]"/>
48
49 <xsl:include href="../common/subtitles.xsl"/>
50 </xsl:stylesheet>
51