Re: Save as Special XHTML+MathML bug
- To: mathgroup at smc.vnet.net
- Subject: [mg38902] Re: [mg38884] Save as Special XHTML+MathML bug
- From: Dale Horton <daleh at wolfram.com>
- Date: Sat, 18 Jan 2003 00:38:20 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
This is because Mozilla does not properly handle <semantics> tags. You can
fix this with an option.
SetOptions[Export, ConversionOptions ->
{"MathMLFormats" -> {"PresentationMathML", "ContentMathML"}}
]
This forces Export to use a different version of the W3C "Universal style
sheet" which strips out the <annotation> for Mozilla. This is not done by
default because we have seen problems with this stylesheet on some browsers.
At 04:38 AM 1/17/2003, Murray Eisenberg wrote:
>A notebook has the input-output cell pair:
>
> Limit[Sin[x]/x, x -> 0]
>1
>
>I do Save As Special XML (XHTML+MathML) to file limit.xml. When viewed
>in a browser supporting native MathML (e.g., Mozilla 1.1), the input
>cell includes a spurious "\[Rule]" while otherwise displaying everything
>correctly, including the arror (which I show here as ->) with
>appropriately sized brackets:
>
>Limit[Sin[x]/x, x -> "\[Rule\"0]
>
>Specifically, the MathML source of the erroneoulsy generated input cell is:
>
> <b><p class="Input"><math xmlns='http://www.w3.org/1998/Math/MathML'>
> <mrow>
> <mi>Limit</mi>
> <mo>[</mo>
>
> <mrow>
> <mrow>
> <mrow>
> <mi>Sin</mi>
> <mo>[</mo>
> <mi>x</mi>
> <mo>]</mo>
>
> </mrow>
> <mo>/</mo>
> <mi>x</mi>
> </mrow>
> <mo>,</mo>
> <mtext> </mtext>
> <mrow>
>
> <mi>x</mi>
> <mtext> </mtext>
> <semantics>
> <mo>→</mo>
> <annotation encoding='Mathematica'>"\[Rule]"</annotation>
> </semantics>
> <mtext> </mtext>
>
> <mn>0</mn>
> </mrow>
> </mrow>
> <mo>]</mo>
> </mrow>
></math></p></b>
>
>
>--
>Murray Eisenberg murray at math.umass.edu
>Mathematics & Statistics Dept.
>Lederle Graduate Research Tower phone 413 549-1020 (H)
>University of Massachusetts 413 545-2859 (W)
>710 North Pleasant Street
>Amherst, MA 01375
-Dale