Re: pref:renderer and a different ctop xsl

> Regardless if I specify that I 'd like css rendering with 
> the pref :renderer attribute it doesn't work on local files. The exact 
> same files work if they are used through a web server



I'm not really sure the pref:renderer stuff was that good an idea.
It does work mostly but it rather complicates the stylesheet and
and it's not really any easier to use than the much simpler alternative
of customising things by just changing the stylesheet.
When I first developed it I had in mind that people wouldn't necessarily
have a copy of the stylesheet to customise, but since I then fornd
thatIE's security  settings essentially made it impossible to reference
the copy on the w3c site, you do have to have a local stylesheet anyway.


Currently it only fully works with pmathml  if you use teh css
preference with mathml.css on windows you basically hit this part of
mathml.css

<!-- not working, currently
<xsl:when test="system-property('xsl:vendor')='Microsoft' and /*/@fns:renderer='css'">
<xsl:variable name="pmml">
<xsl:apply-templates mode="c2p"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($pmml)/node()"/>
</xsl:when>
-->


or rather you would hit it if it wasn't commented out....


> so as the content 
> MathML is processed from ctop rather than let it be handled by 
> MathPlayer.

I'd just reference a stylesheet that's a modified version of mathml.css
that does imports cto overrides a few templates and then essentially
hands over to pmathml.css to handle the rest.

The stylesheet below works on IE and firefox on teh one file I tested,
and always uses ctop rendering modified to do infinity in a nice shade
of green....


David



<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  xmlns:mml="http://www.w3.org/1998/Math/MathML"
  extension-element-prefixes="msxsl"
>

<!--
Copyright David Carlisle 2001, 2002.

Use and distribution of this code are permitted under the terms of the <a
href="http://www.w3.org/Consortium/Legal/copyright-software-19980720"
>W3C Software Notice and License</a>.
-->

<xsl:include href="ctop.xsl"/>
<xsl:include href="pmathml.xsl"/>

<xsl:output/>

<xsl:template match="/">
<xsl:choose>
<xsl:when test="system-property('xsl:vendor')='Transformiix'">
<xsl:apply-templates mode="c2p"/>
</xsl:when>
<xsl:when test="system-property('xsl:vendor')='Microsoft'">
<xsl:variable name="pmml">
<xsl:apply-templates mode="c2p"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($pmml)/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template> 


<!-- 4.4.12.15 infinity -->
<xsl:template mode="c2p" match="mml:infinity">
  <mml:mi mathcolor="green">OO</mml:mi>
</xsl:template>

</xsl:stylesheet>


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Received on Tuesday, 15 February 2005 10:47:04 UTC