RE: [docbook-apps] Re: stylesheet customization fails trying to strip a namespace prefix and some unwanted attributes

From
Mauritz Jeanson <>
Date
2006-11-12T11:51:56+00:00
ID
000301c70650$f6f748e0$71ea1a51@D7MZ171J
Thread
RE: [docbook-apps] Re: stylesheet customization fails trying to strip a namespace prefix and some unwanted attributes
> -----Original Message-----
> From: Chris Chiasson

> <xsl:for-each 
>       select="@*[namespace-uri()=namespace-uri(parent::self)]">
>  <xsl:copy/>
> </xsl:for-each>


The parent::self thingy must be a mistake. I suppose you really meant
parent::*. But that won't help, because attributes without a prefix will not
be copied. Unprefixed attributes are not in any namespace, and the
namespace-uri() function returns an empty string when applied to such
attribute nodes.

I think that my suggestion

 <xsl:for-each
select="@*[not(namespace-uri()='http://www.wolfram.com/XML/')]">

is what you should use. Then all attributes, except those in the Mathematica
namespace, will be copied.

/MJ