|
Subject: [xsl] MathML and XSL From: Gerard Milmeister <milmei@xxxxxxxxxxxx> Date: 09 Nov 2002 20:21:12 +0100 |
Hi,
I am writing an application for mathematical publishing.
I have written a DTD that include MathML in this way:
<!ENTITY % mathml PUBLIC "-//W3C//DTD MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">
%mathml;
I have specified a tag <eqn> that may include a <math> tag.
What I want is to translate my XML documents to XHTML, but leave
the <math> elements alone for the browser to interpret.
I my XSL sheet I have the following.
<xsl:template match="math">
<math xmlns="http://www.w3.org/TR/MathML2">
<xsl:apply-templates/>
</math>
</xsl:template>
<xsl:template match="math//*">
<xsl:element name="{name(.)}">
<xsl:for-each select="@*">
<xsl:attribute name="{name(.)}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
so that math elements get copied as is.
However this doesn't work. math elements simply don't
get matched. I guess it is a problem with name spaces.
Is there a simple solution to include mathml elements
in a xml, that simply get copied to a XHTML output?
Regards,
--
Gérard Milmeister
Universität Zürich
Tel: 01-635 45 65
E-Mail: milmei@xxxxxxxxxxxx
Büro: 27-G-35
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] checking for empty elemen, David Carlisle | Thread | Re: [xsl] MathML and XSL, David Carlisle |
| Re: [xsl] Generating schema target , Dan Vint | Date | Re: [xsl] checking for empty elemen, David Carlisle |
| Month |