Re: Mathml display with IE

Robert Miner wrote:
...

> 
> 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
> 
> 
...

You might also be able to use the XPath translate function if the character 
problems are widespread across different math tags (see 
http://www.w3.org/TR/xpath#function-translate).

Maybe something like:

<xsl:template match="text()">
   <xsl:value-of select="translate(.,'X','Y')"/>
</xsl:template>

or maybe?

<xsl:template match="text()">
   <xsl:value-of select="translate(.,'&#xE084','&lt;')"/>
</xsl:template>

-- 
Thomas Habing
Research Programmer, Digital Library Projects
University of Illinois at Urbana-Champaign
155 Grainger Engineering Library Information Center, MC-274
thabing@uiuc.edu, (217) 244-4425
http://dli.grainger.uiuc.edu

Received on Friday, 5 March 2004 11:58:42 UTC