[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

MathML and XSL

Subject: MathML and XSL
From: Gerard Milmeister <milmei@xxxxxxxxxxxx>
Date: 09 Nov 2002 20:21:12 +0100
mathml2 xsl
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.