Re: XSL matching, that changes < into &lt; in one mathml section, while leaving other mathml sections to be transferred by pmathml.xsl

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="&lt;math&gt;&#xA;         &lt;mi&gt;a&lt;/mi&gt;&#xA;         &lt;mo&gt;+&lt;/mo&gt;&#xA;         &lt;mi&gt;b&lt;/mi&gt;&#xA;&lt;/math&gt;"/>

<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