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

MathML tags in an attribute of an HTML EMBED tag ?

Subject: MathML tags in an attribute of an HTML EMBED tag ?
From: Frédéric SCHWEBEL <schwebel@xxxxxxxxxxxxxxxx>
Date: Wed, 25 Oct 2000 15:03:41 +0200
mathml tags
Hi folks,

I use the "cocoon package" (so Xalan as the XSL processor), but also test my
xsl with Instant Saxon 5.2. I have this in my XML file :
<FORMULE>
    <MATH>... some mathml  ... </MATH>
<FORMULE>

and I want to output this :

<EMBED TYPE="text/mathml" MMLDATA="
<math>...some mathml ...</math>" HEIGHT="75" WIDTH="200" />
to render MathML with the IBM techexplorer plug-in.

I checked many parts of the (great) daveP FAQ dealing with this stuff :
http://www.dpawson.freeserve.co.uk/xsl/cdata.html
http://www.dpawson.freeserve.co.uk/xsl/N7150.html
http://www.dpawson.freeserve.co.uk/xsl/N4554.html

I tried many different solutions, none works. Here are the three "general"
types of solutions I used :
****************
<xsl:template match="FORMULE">
   <EMBED TYPE="text/mathml" MMLDATA="<xsl:apply-templates />
     " HEIGHT="75" WIDTH="200" />
</xsl:template>

RESULT : "The value of attribute "MMLDATA" must not contain the '<'
character"
(result is the same if I put <xsl:text> before and after the
apply-tempaltes, with or without disable-output-escaping, and also if i
replace the apply-templates with <xsl:copy-of select="math" />)

****************
second serie of attempts :)
<xsl:template match="FORMULE">
<![CDATA[
   <EMBED TYPE="text/mathml" MMLDATA="]]>
<xsl:copy-of select="math" />
<![CDATA[
     " HEIGHT="75" WIDTH="200" /> ]]>
</xsl:template>

RESULT : I just get the string "<EMBED ..." in the output window (the < >
and " have been replaced with &lt; &gt; and &quot)
I get the same result if i put xsl:text disable-output-escaping="yes" before
each CDATA section EXCEPT that in the source of output I have this :
<?xslt-next-is-raw formatter-to-dom?> before the mathml starts (all the
mathml is in the source, but since the plug-in is not started...)

****************

third and last serie of attempts :
<xsl:template match="FORMULE">
<xsl:element name="embed">
<xsl:attribute name="TYPE">text/mathml</xsl:attribute>
<xsl:attribute name="HEIGHT">75</xsl:attribute>
<xsl:attribute name="WIDTH">200</xsl:attribute>
<xsl:attribute name="MMLDATA"><xsl:copy-of select="math" />
   </xsl:attribute>
</xsl:template>

RESULT : this time, the plug-in starts but I get the message " Missing Math
ML root element" in the plug-in zone. Looking at the source, I see that all
MathML tags have been removed (both with saxon and Xalan) within the MML
data attribute !!!! Why ? the result is the same if I put the xsl-copy of
math in a param and then try to put <xsl:value-of select="$parameter"> for
the value of MMLDATA.

**************

By the way, the ouput method is "text/html/loose" for my stylesheet. I tried
"text" but the rest of the doc don't work if I do that...

So I really need the help of somebody, here... Thanks in advance for any
reply.
There is still the solution of putting the MathML in a separate file and the
put an SRC attribute for the EMBED tag instead of MMLDATA with the name of
the .mml file, but I really would like to avoid it...

Frederic

PS : I don't know if somebody might be interested in it, but the XSL sheet I
made last last year to translate MathML into French Braille is available at
http://handy.univ-lyon1.fr/projets/bramanet/
I prefer working for blind people : they just need ASCII chars, they don't
need plug-ins !


 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.