This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] patch for xsl/templates/titlepage.xsl
- From: Kai Schröder <cyberian at arcor dot de>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 12 Nov 2003 02:04:17 +0100
- Subject: [docbook-apps] patch for xsl/templates/titlepage.xsl
- References: <200311120050.41404.cyberian@arcor.de>
Hello from Berlin (Germany).
I hope this is the right place for posting patches for docbook-xsl (if not,
please tell me). Attached patch will fix the reported namespace problems
with the fo titlepage template. Please test and commit to CVS.
Regards,
Kai
Index: template/titlepage.xsl
===================================================================
RCS file: /cvsroot/docbook/xsl/template/titlepage.xsl,v
retrieving revision 1.4
diff -u -r1.4 titlepage.xsl
--- template/titlepage.xsl 20 Jan 2003 21:44:26 -0000 1.4
+++ template/titlepage.xsl 11 Nov 2003 22:58:22 -0000
@@ -310,11 +310,20 @@
</xsl:attribute>
<xsl:for-each select="@*">
<xsl:if test="not(starts-with(namespace-uri(.),
- 'http://nwalsh.com/docbook/xsl/
template/1.0'))">
- <xsl:attribute name="{name(.)}" namespace="{namespace-uri(.)}">
- <xsl:value-of select="."/>
- </xsl:attribute>
- </xsl:if>
+ 'http://nwalsh.com/docbook/xsl/
template/1.0'))">
+ <xsl:choose>
+ <xsl:when test="namespace-uri(.) != ''">
+ <xsl:attribute name="{name(.)}"
namespace="{namespace-uri(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
</xsl:for-each>
<xsl:text>
</xsl:text>
@@ -798,9 +807,18 @@
<xsl:for-each select="@*">
<xsl:if test="not(starts-with(namespace-uri(.),
'http://nwalsh.com/docbook/xsl/
template/1.0'))">
- <xsl:attribute name="{name(.)}"
namespace="{namespace-uri(.)}">
- <xsl:value-of select="."/>
- </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="namespace-uri(.) != ''">
+ <xsl:attribute name="{name(.)}"
namespace="{namespace-uri(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:if>
</xsl:for-each>
<xsl:text>
</xsl:text>
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.