W3C home > Mailing lists > Public > www-math@w3.org > March 2004

Re: Mathml display with IE

From: Robert Miner <RobertM@dessci.com>
Date: Fri, 5 Mar 2004 10:16:39 -0600
Message-Id: <200403051616.i25GGdV24044@wisdom.geomtech.com>
To: davidc@nag.co.uk
Cc: pzn04@yahoo.fr, www-math@w3.org


Hi.

> If it's an xsl-question it may be better to move to xsl-list, but I'm a
> little confused as I thought initially you said that you were authoring
> in open office which I assumed meant that you were directly entering
> the document in an editor rather than generating it with xsl, so I am
> not sure how xsl is involved?

Sorry.  It was my suggestion.  My point was that if Open Office
systematically generates bad characters (which apparently it does)
then somehow one has to correct them to get proper output.  The
options I see are

1) get Open Office to fix its output.  Clearly the best long term, but
   not practical for an end users with an immediate need.

2) hand editor or otherwise post process the code to fix the errors.
   Workable, but painful.

3) serve the content with a private version of the pmathml.xsl
   stylesheet that corrects the errors.  This is really just a version
   of 2, but a little easier to manage, and with more possibility of
   reuse by others until 1) happens.

The confusion arose because I was writing from home last night and
couldn't remember the syntax for the proper kind of XSL rule.
However, reunited with my XSL book, I see it should be something like
this:

<xsl:template match="mml:mo[. = 'X']">
  <mml:mo>Y</mml:mo>
</xsl:template>

This should replace an <mo> element whose CDATA is 'X' with one whose
CDATA is 'Y'.  So adding are rule like

<xsl:template match="mml:mo[. = '\356\202\204']">
  <mml:mo>&amp;lt;</mml:mo>
</xsl:template>

to pmathml.xsl corrects the Open Office problem.  Note that
\356\202\204 should be the real UTF-8 character.  I wrote it out in
octal since I doubt it would come through properly in the posting.

--Robert


------------------------------------------------------------------
Dr. Robert Miner                                RobertM@dessci.com
MathML 2.0 Specification Co-editor                    651-223-2883
Design Science, Inc.   "How Science Communicates"   www.dessci.com
------------------------------------------------------------------
Received on Friday, 5 March 2004 11:17:13 GMT

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