[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: stylesheet customization fails trying to strip a namespace prefix and some unwanted attributes
Hi,
I am trying to strip the mml: prefix from MathML elements. In
addition, I need the xmlns:mml="some url" attribute to come through as
xmlns="some url" and I need to eliminate the following attributes from
the mml:math element: xmlns:mathematica and mathematica:form
this is what i have so far:
<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
<xsl:element name="{local-name(.)}">
<xsl:for-each select="@mml:*">
<xsl:attribute name="{local-name(.)}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
<xsl:for-each select="@xmlns:mml"
xmlns:xmlns="http://www.w3.org/2000/xmlns/">
<xsl:attribute name="xmlns">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
it writes out the math element and its children unprefixed, but it
also puts xmlns="" and form="TraditionalForm" in attributes of the
math element
(the original value of mathematica:form is TraditionalForm)
How does one force the output to retain the MathML namespace and drop
that form element?
Thanks,
--
http://chris.chiasson.name/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]