mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
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:
committed by
michael.will
parent
e0d14d9fcc
commit
814f42b86e
@ -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>
|
||||
|
||||
30
build/docbook/filter_language.xsl
Executable file
30
build/docbook/filter_language.xsl
Executable 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>
|
||||
Reference in New Issue
Block a user