[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: patch for xsl/templates/titlepage.xsl
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>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]