W3C home > Mailing lists > Public > www-math@w3.org > July 2003

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

From: Morten Andersen <mortena@mip.sdu.dk>
Date: Thu, 10 Jul 2003 09:27:32 +0200
Message-Id: <5.2.1.1.0.20030710091450.035f1828@mailhost.mip.sdu.dk>
To: www-math@w3.org

Dear experts

I want to have both formulas that is perfectly rendered in the browser, 
plus formulas, that I can edit with InputControl from WebEQ on the same 
web-page.

After some mails to this list I think I found out how to implement the page.

1) The formulas, that must be edited using InputControl are marked on the 
server (Perhaps with a <editFormula><math ...</math></editFormula>)
2) I implement a xsl tranformation file, that extends pmathml.xsl, but 
which overrules the part that translates "<math..." into "<mml:math", with 
a part, that initializes the InputControl Applet with code like this:

      <applet ..... value="&lt;math>&lt;mi>A&lt;/mi>&lt;/math>...</applet>.

when I'm in the editing part, but leaves the rest to pmathml to transfer.

Therefore I need some xsl code, that transfers all mathml in a 
<editFormula> section into something, that can be parsed into the 
InputControl applet.

I'm quite new to xsl, so please fell free to send me some code...  :-)


So what I want is code that tranfers:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="SomeXSLFile.xsl">
...

<math xmlns="http://www.w3.org/1998/Math/MathML">
   <mrow>
	Bla bla
   </mrow>
</math>
...
<editFormula>
  <math xmlns="http://www.w3.org/1998/Math/MathML">
   <mrow>
	This must be edited
   </mrow>
  </math>
</editFormula>
...

Into some XHTML where the latter formula is editable in a WEBEQ editor 
while the first is left to be rendered in the browser.


Thanks

Morten Andersen
Denmark 
Received on Thursday, 10 July 2003 07:03:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:55 GMT