Implement lang attribute in quickbook/boostbook.

[SVN r67090]
This commit is contained in:
Daniel James 2010-12-07 20:44:23 +00:00
parent a14f4c7a04
commit 7a62da4197
9 changed files with 52 additions and 13 deletions

View File

@ -1,4 +1,4 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book xmlns:xi="http://www.w3.org/2001/XInclude" id="test" last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $">
<book xmlns:xi="http://www.w3.org/2001/XInclude" id="test" lang="en">
<title>Test 'boostbook' root.</title>
</book>

View File

@ -2,7 +2,8 @@
<!DOCTYPE boostbook PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<boostbook id="test" xmlns:xi="http://www.w3.org/2001/XInclude"
last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $">
last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $"
lang="en">
<title>Test 'boostbook' root.</title>
</boostbook>

View File

@ -0,0 +1,4 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<chapter id="test" last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $" lang="en">
<title>Test 'boostbook' root.</title>
</chapter>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<chapter id="test" xmlns:xi="http://www.w3.org/2001/XInclude"
last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $"
lang="en">
<title>Test 'boostbook' root.</title>
</chapter>

View File

@ -0,0 +1,4 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<chapter lang="en" id="id1-bb">
<title>Test 'boostbook' root.</title>
</chapter>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<library lang="en">
<title>Test 'boostbook' root.</title>
</library>

View File

@ -0,0 +1,4 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<chapter xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" id="test" rev:last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $">
<title>Test 'boostbook' root.</title>
</chapter>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<library id="test" xmlns:xi="http://www.w3.org/2001/XInclude"
last-revision="$Date: 2010-10-30 15:29:27 +0100 (Sat, 30 Oct 2010) $">
<title>Test 'boostbook' root.</title>
</library>

View File

@ -399,16 +399,12 @@ Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-o
($boost.include.libraries='' or
contains($boost.include.libraries, @id))">
<chapter>
<xsl:attribute name="id">
<xsl:choose>
<xsl:when test="@id">
<xsl:value-of select="@id"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="generate.id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:copy-of select="@*[not(contains(' last-revision name dirname html-only url ', concat(' ',local-name(),' ')))]"/>
<xsl:if test="not(@id)">
<xsl:attribute name="id">
<xsl:call-template name="generate.id"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@last-revision">
<xsl:attribute
@ -437,7 +433,10 @@ Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-o
</xsl:template>
<xsl:template match="boostbook">
<book><xsl:copy-of select="@*"/><xsl:apply-templates/></book>
<book>
<xsl:copy-of select="@*[not(contains(' last-revision name dirname html-only url ', concat(' ',local-name(),' ')))]"/>
<xsl:apply-templates/>
</book>
</xsl:template>
<xsl:template match="programlisting">