1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
<!--
This file is part of Debiandoc2docbookxml
split.xml
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
version="1.0"
method="xml"
indent="yes"
omit-xml-declaration="yes"
encoding="iso-8859-1"/>
<xsl:template match="chapter" priority="+1">
<xsl:variable name="chap">
<xsl:value-of select="@id"/>
</xsl:variable>
<xsl:document href="{$dir}/{$chap}.{$locale}.xml" method="xml" omit-xml-declaration="yes" indent="yes" encoding="iso-8859-1">
<chapter>
<xsl:if test="@id!=''">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</chapter>
</xsl:document>
<xsl:text disable-output-escaping="yes">&</xsl:text><xsl:value-of select="$chap"/><xsl:text>; </xsl:text>
</xsl:template>
<xsl:template match="appendix" priority="+1">
<xsl:variable name="chap">
<xsl:value-of select="@id"/>
</xsl:variable>
<xsl:document href="{$dir}/{$chap}.{$locale}.xml" method="xml" omit-xml-declaration="yes" indent="yes" encoding="iso-8859-1">
<appendix>
<xsl:if test="@id!=''">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</appendix>
</xsl:document>
<xsl:text disable-output-escaping="yes">&</xsl:text><xsl:value-of select="$chap"/><xsl:text>; </xsl:text>
</xsl:template>
<xsl:template match="bookinfo" priority="+1">
<xsl:document href="{$dir}/titletoc.{$locale}.xml" method="xml" omit-xml-declaration="yes" indent="yes" encoding="iso-8859-1">
<bookinfo>
<xsl:apply-templates/>
</bookinfo>
</xsl:document>
<xsl:text disable-output-escaping="yes">&titletoc; </xsl:text>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="comment()">
<xsl:comment>
<xsl:value-of select="."/>
</xsl:comment>
</xsl:template>
<xsl:template match="processing-instruction()">
<xsl:copy>
<xsl:value-of select="."/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
|