W3C home > Mailing lists > Public > www-math@w3.org > April 2002

Embedding MathML into HTML question.

From: Jimmy Cerra <jimbofc@yahoo.com>
Date: Fri, 12 Apr 2002 00:09:00 -0400
To: <www-math@w3.org>
Message-ID: <000001c1e1d7$ca2587c0$0100a8c0@locutus>
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"
	<title>HTML + MathML test: My Lord, is this legal?</test>
	<p>Here is some text in a HTML 4.01 document.</p>
	<form	name="MathML_test1"
		action="-//JFC//JS MathML Proc//EN"
		<input type="hidden" name="eq1" value="

<?xml version='1.0'?>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
		<mn> 2 </mn>

	<p>Here is some more text in a HTML 4.01 document.</p>

Note: The above markup doesn't contain the JavaScript code to read the

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:32 UTC