[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] MathML and 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|