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

RE: Pass-Through of MathML-Elements

Subject: RE: Pass-Through of MathML-Elements
From: "bryan" <bry@xxxxxxxxxx>
Date: Tue, 14 May 2002 12:28:35 +0200
xhtml math svg.dtd
Haven't read over all your post here, but you might be interested in
looking at the following http://www.w3.org/Math/XSL/Overview-tech.html
something that David Carlisle recently posted to this list for xslt for
MathMl.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Maik
Stührenberg
Sent: Tuesday, May 14, 2002 11:51 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Pass-Through of MathML-Elements

Hello,
I use a DTD for XML documents which allows the use of MathML 2.0
Elements 
wrapped in the element Formula:

<!ENTITY % MATHML.prefixed "INCLUDE">
<!ENTITY % MATHML.prefix "mml">
<!ENTITY % math PUBLIC "-//W3C//DTD MathML 2.0//EN" 
"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">
%math;
<!ELEMENT Formula (%math.qname;)*>
<!ATTLIST Formula xmlns:mml CDATA #FIXED 
"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" Display (Block | Inline) 
"Inline">

A XML sample file could contain some MathML elements:
...
<Content>
</Text>
<Paragraph>This is an example text.
<Formula xmln:mml="http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">
<mml:math>
<mml:row>
...
</mml:row>
</mml:math
</Formula>
</Paragraph>
</Text>
</Content>
...

The XML source is transformed to HTML with a XSL Stylesheet with Instant

Saxon 6.5.2. The embedded MathML elements shall be passed through with a

result like this:
<html>
<head>
</head>
<body>
...
<mml:math>
<mml:row>
...
</mml:row>
</mml:math>
...
</body>
</html>

If I try to use the following stylesheet the MathML elements will be 
transformed to HTML (XSL version 1.1 is used to use the xsl:document
with 
Saxon).

<?xml version="1.0"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" 
doctype-system="http://www.w3.org/TR/html4/loose.dtd" 
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
encoding="ISO-8859-1" indent="yes"/>
...
<xsl:template match="Formula">
<xsl:choose>
<xsl:when test="@Display='Block'">
<blockquote>
<xsl:value-of select="."/>
</blockquote>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
...
</xsl:stylesheet>

The same problem still with the XHTML and MathML and SVG Profile from
W3C 
(http://www.w3.org/TR/2002/WD-XHTMLplusMathMLplusSVG-20020430/xhtml-math
-svg.html), 
all MathML elements will be transformed.

<?xml version="1.0"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" 
doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.
dtd" 
doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" 
encoding="UTF-8" indent="yes"/>

I thought the default rule for XSLT processors is to pass the output 
through so I deleted the whole Formula template - same result. What
output 
parameter, encoding or template do I need to define to get MathML
elements 
pass through?
Kind regards,

Maik Stührenberg


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 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.