  | |  | Problem with XPath namespace axis? | Problem with XPath namespace axis? 2006-08-14 - By Sean Gilligan
david_marston@(protected) wrote: > Sean Gilligan writes about a [known] problem with > <xsl:copy-of select="document('')/xsl:stylesheet/namespace::exsl"/> > > One possible workaround that may be pretty universal is to try > <xsl:copy-of > select="document('')/xsl:stylesheet/namespace::*[name(.)='exsl']"/> > or maybe even try local-name(.) if desperate. Use string(.) to match the > namespace URI. > .................David Marston > > > Thanks for the responses. The problem was occurring when using the DocBook XSL stylesheets to generate a custom titlepage. I switched to Saxon to avoid the problem, but will submit the information to the docbook-apps mailing list as well. In case anyone is interested, I'll provide the details of the DocBook XSL code.
I'm using DocBook XSL 1.69.1, although the problem appears to exist in the latest version (1.70.1) as well. This excerpt starts at line 76 of the file template/titlepage.xsl:
<xsl:template match="t:templates"> <xsl:element name="xsl:stylesheet"> <xsl:copy-of select="document('')/xsl:stylesheet/namespace::exsl"/> ... snip ... </xsl:template>
Regards,
Sean
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <a class="moz-txt-link-abbreviated" href="mailto:david_marston@(protected)" >david_marston@(protected)</a> wrote: <blockquote cite="midOF28C8B25F.4C001745-ON852571CA.0056485D-852571CA.00568CAC@(protected)" type="cite"> <pre wrap="">Sean Gilligan writes about a [known] problem with <xsl:copy-of select="document('')/xsl:stylesheet/namespace::exsl"/>
One possible workaround that may be pretty universal is to try <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*[name(.)='exsl']"/> or maybe even try local-name(.) if desperate. Use string(.) to match the namespace URI. .................David Marston
</pre> </blockquote> <font face="Monaco">Thanks for the responses. The problem was occurring when using the DocBook XSL stylesheets to generate a custom titlepage. I switched to Saxon to avoid the problem, but will submit the information to the docbook-apps mailing list as well. In case anyone is interested, I'll provide the details of the DocBook XSL code.<br> <br> I'm using DocBook XSL 1.69.1, although the problem appears to exist in the latest version (1.70.1) as well.<br> This excerpt starts at line 76 of the file template/titlepage.xsl:<br> <br> <xsl:template match="t:templates"><br> <xsl:element name="xsl:stylesheet"><br> <xsl:copy-of select="document('')/xsl:stylesheet/namespace::exsl"/><br> ... snip ...<br> </xsl:template><br> <br> Regards,<br> <br> Sean<br> <br> <br> <br> </font> </body> </html>
|
|
 |