[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Re: stylesheet customization fails trying to strip a namespace prefix and some unwanted attributes
> -----Original Message-----
> From: Chris Chiasson
>
> This puts the output tree in the correct namespace, but still leaves
> the form attribute...
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:mml="http://www.w3.org/1998/Math/MathML"
> xmlns:xmlns="http://www.w3.org/2000/xmlns/"
> xmlns:mathematica="http://www.wolfram.com/XML/"
> version="1.0">
> <xsl:template match="mml:*">
> <xsl:element name="{local-name(.)}"
> namespace="http://www.w3.org/1998/Math/MathML">
> <xsl:for-each select="@mml:*">
> <xsl:attribute name="{local-name(.)}">
> <xsl:value-of select="."/>
> </xsl:attribute>
> </xsl:for-each>
> <xsl:apply-templates/>
> </xsl:element>
> </xsl:template>
> </xsl:stylesheet>
I hope that this will do the trick:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:mathematica="http://www.wolfram.com/XML/"
version="1.0">
<xsl:template match="mml:*">
<xsl:element name="{local-name(.)}"
namespace="http://www.w3.org/1998/Math/MathML">
<xsl:for-each
select="@*[not(namespace-uri()='http://www.wolfram.com/XML/')]">
<xsl:copy/>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
/MJ
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]