fix docbook build

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@11901 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Michael Will
2010-09-17 18:18:02 +00:00
committed by michael.will
parent e0d14d9fcc
commit 814f42b86e
2 changed files with 32 additions and 1 deletions

View File

@ -901,7 +901,7 @@
</target>
<!-- docbook ========================================================================= -->
<target name="docbook" depends="proxy" description="Docbook">
<target name="docbook" description="Docbook">
<mkdir dir="${target}/docbook"/>
<exec executable="xmllint">
<arg value="--xinclude" />
@ -954,6 +954,7 @@
<condition property="proxy.enabled">
<and>
<isset property="proxy.host"/>
<isreachable host="${proxy.host}"/>
</and>
</condition>
</target>

View File

@ -0,0 +1,30 @@
<?xml version='1.0' encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="language">en</xsl:param>
<xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd "/>
<xsl:template match="book">
<book lang="{$language}" id="{@id}" revision="{@revision}">
<xsl:apply-templates/>
</book>
</xsl:template>
<xsl:template match="*">
<xsl:if test="not(@lang) or @lang=$language">
<xsl:choose>
<xsl:when test="count(.//*[not(@lang) or @lang=$language])=0">
<xsl:copy-of select="." />
</xsl:when>
<xsl:otherwise>
<xsl:element name="{name(.)}">
<xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
<xsl:apply-templates/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
</xsl:stylesheet>