It’s just data

MathML

Jacques Distler: Unable to leave well enough alone, I tinkered some more with itex2MML.

I’ll join in the fun.  The CVS HEAD version of the Universal Feed Parser now supports “Jacques Distler’s subset of MathML”.

Take a look at this test feed.  MathML.  In RSS 2.0.  No declaration of xlink anywhere to be found.  It is not even well-formed XML (missing angle bracket on closing rss element).  No problem.

Of course, the well-formed, Atom 1.0, xhtml version is also supported.

These changes have also gone into my branch of planet (Note to Jeff, this can wait for a 1.1 or 2.0 release; please get a 1.0 out as soon as possible).

Jacques: what more do I need to do to make Planet Intertwingly itself support MathML?  Is it just a matter of a proper DOCTYPE and Mime type at this point?


DOCTYPE schmocktype!

If it’s well-formed XML, just send it out to compatible browsers as application/xhtml+xml.

Unfortunately, it currently contains HTML named-entities. You’ll need to convert those to NCRs or UTF-8 characters.

It’s also, currently, not well-formed. (Bill Humphries “Post WisCon” post is ill-formed.) So you’ve got a little bit of work left.

If you want to avail yourself of the W3C Validator, and wish to avoid wading through the MathML-induced errors (you’ll still have to wade through the missing alt-attribute errors), use:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" >

Posted by Jacques Distler at

DOCTYPE schmocktype!

;-)

If it’s well-formed XML, just send it out to compatible browsers as application/xhtml+xml.

I might just send it out as application/xhtml+xml to the non-compatible browsers too.  ;-)

Unfortunately, it currently contains HTML named-entities. You’ll need to convert those to NCRs or UTF-8 characters.

Isn’t that what the DTD is for?

It’s also, currently, not well-formed. (Bill Humphries “Post WisCon” post is ill-formed.) So you’ve got a little bit of work left.

Slightly ahead of you (read the comments).  ;-)

Posted by Sam Ruby at

Unfortunately, it currently contains HTML named-entities. You’ll need to convert those to NCRs or UTF-8 characters.

Isn’t that what the DTD is for?

In a validating XML parser, yes. Browsers, however, don’t use a validating parser. They use a pseudo-DTD to resolved named entities in “known” DOCTYPEs.

The upshot: Safari and Opera accept application/xhtml+xml, but don’t support XHTML+MathML. So they won’t know what to do with the HTML named entities like &copy;.

If you want all browsers to do the right thing, you either do what I used to do (send application/xhtml+xml only to a select set of browsers known to support XHTML+MathML) or convert all the “unsafe” named entities to NCRs, and send application/xhtml+xml to all browsers that claim to ACCEPT it.

N.B.: I still browser sniff for IE6 with the MathPlayer plugin installed. Despite not really being an XHTML-UA, it does render the MathML if you send the document  with an application/xhtml+xml MIME-type.

Posted by Jacques Distler at

I Can’t help Myself ...

itex2MML 1.1.3.... [more]

Trackback from Musings

at

If you want all browsers to do the right thing, you either do what I used to do (send application/xhtml+xml only to a select set of browsers known to support XHTML+MathML) or convert all the “unsafe” named entities to NCRs, and send application/xhtml+xml to all browsers that claim to ACCEPT it.

I went with utf-8.  Seems to be working w/firefox 1.5.

Posted by Sam Ruby at

Umh ... wow! .. yes, so it does.

Considering the dog’s breakfast of input you’re starting with, it’s quite amazing that, at the end of the day, well-formed XHTML comes out the other end.

And, as a byproduct, the UFP now supports MathML.

Quite a good week, I should say.

Posted by Jacques Distler at

Considering the dog’s breakfast of input you’re starting with, it’s quite amazing that, at the end of the day, well-formed XHTML comes out the other end.

You think that’s a dog’s breakfast of input?  Take a look at this.

Planet orchestrates.  UFP worries about feeds.  BeautifulSoup worries about HTML.  I just had to convince each of them to accept a few patches.

Posted by Sam Ruby at

Publishing MathML

Ah the synergies, Sam Ruby talk about getting MathML supported in planet, and the Ephox weblog talks about getting EditLive! for Java to automatically upload image versions of MathML equations so they render in any browser. The nice thing about...

Excerpt from Symphonious at

Adrian Sutton: Publishing MathML

Ah the synergies, Sam Ruby talk about getting MathML supported in planet, and the Ephox weblog talks about getting EditLive! for Java to automatically upload image versions of MathML equations so they render in any browser. The nice thing about...

Excerpt from Planet Apache at

Planet Musings

Introducing Planet Musings.... [more]

Trackback from Musings

at

Add your comment