- From: David Carlisle <davidc@nag.co.uk>
- Date: Thu, 10 Jul 2003 14:14:13 +0100
- To: mortena@mip.sdu.dk
- CC: www-math@w3.org
A stylesheet like the following will duplicate the element, first
copying it then quoting all te < and & and sticking it a mmldata
attribute of an applet with name ljhgljg
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
>
<xsl:import href="pmathml.xsl"/>
<xsl:template match="h:editFormula|editFormula">
<xsl:copy-of select="*"/>
<applet name="ljhgljg">
<xsl:attribute name="mmldata">
<xsl:apply-templates mode="verb" select="*"/>
</xsl:attribute>
</applet>
</xsl:template>
</xsl:stylesheet>
input test file and output result follow:
<html
xmlns="http://www.w3.org/1999/xhtml"
>
<head>
<title>Presentation Examples</title>
</head>
<body>
<h1>Presentation MathML</h1>
<p>yyy</p>
<editFormula>
<math xmlns="http://www.w3.org/1998/Math/MathML"
>
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</math>
</editFormula>
<p>
xxx
</p>
</body>
</html>
produces:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:h="http://www.w3.org/1999/xhtml">
<head>
<title>Presentation Examples</title>
</head>
<body>
<h1>Presentation MathML</h1>
<p>yyy</p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</math><applet name="ljhgljg" mmldata="<math>
 <mi>a</mi>
 <mo>+</mo>
 <mi>b</mi>
</math>"/>
<p>
xxx
</p>
</body>
</html>
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
Received on Thursday, 10 July 2003 09:14:36 UTC