- From: Jimmy Cerra <jimbofc@yahoo.com>
- Date: Fri, 12 Apr 2002 00:09:00 -0400
- To: <www-math@w3.org>
As I wrote in another message, I'm designing a JavaScript MathML processor (as an alternative to plug-ins, XSLT and naive rendering) to embed MathML into HTML - specifically, versions 4.01 and 3.2. One problem is how to embed the MathML (an XML app) document into the HTML (a SGML app). The mathematics should be accessible from early browsers as well as later ones, but the code shouldn't be seen by browsers without JavaScript enabled or supported. I came up with using a input element to "store" the MathML. Here's an example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>HTML + MathML test: My Lord, is this legal?</test> </head> <body> <p>Here is some text in a HTML 4.01 document.</p> <form name="MathML_test1" action="-//JFC//JS MathML Proc//EN" enctype="application/mathml+xml"> <input type="hidden" name="eq1" value=" <?xml version='1.0'?> <math xmlns='http://www.w3.org/1998/Math/MathML'> <mfrac> <mrow> <mn>1</mn> <mo>+</mo> <msqrt> <mn>5</mn> </msqrt> </mrow> <mn> 2 </mn> </mfrac> </math> "></form> <p>Here is some more text in a HTML 4.01 document.</p> </body> Note: The above markup doesn't contain the JavaScript code to read the MathML. Is this valid HTML 4.01? I don't think this mixed markup since the entire MathML document is contained within the attribute of the input tag. In addition, since the action attribute of the form tag is necessary, I wrote a 'fake' URI specifying the rendering application: the JavaScript MathML processor. --- Jimmy Cerra P.S. I'm sorry for all the questions. If I'm breaching proper etiquette for this mailing list, then *PLEASE TELL ME* and accept my sincere apologies.
Received on Friday, 12 April 2002 00:09:16 UTC