Subject: Re: [xsl] Entity References From: "Rob Lugt" <roblugt@xxxxxxxxx> Date: Thu, 9 Aug 2001 09:32:47 +0100 |
Werner Hager wrote: > I've just recently joined and it looks like there is a lot of useful > information going around. Maybe I can get some ideas about my particular > problem. I'm writing an XSLT to transform one MathML Document to another > MathML Document with the addition of some formatting tags so it prints > better on a braille printer. The issue is the special entities that are > used in MathML. Since a MathML document doesn't need to declare their > entities, I think my processor is having problems with them. Here is the > sample MathML Document: > > <mrow> > <snipped/> > </mrow> > > I'm using Xalan-Java for testing puposes, but I want it to work with MSXSL > as well (I want most of the process to be invisible to the user) With > Xalan, I get the error [the entity "InvisibleTimes" was referenced but not > declared]. MathML has a large number of these entities... Any ideas how > I can copy them into the result tree? You don't appear to be including a reference to the MathML DTD in your XML document. I presume you have downloaded the DTD from http://www.w3.org/Math/DTD/ If you add a DOCTYPE declaration, then the XML parser should be able to resolve the entities correctly. The following works ok on my system:- <!DOCTYPE mrow SYSTEM "file:///c:/xml/MathML/dtd/mathml2.dtd"> <mrow> <mfenced> <mrow> <mi>x</mi> <mo>+</mo> <mn>2</mn> </mrow> </mfenced> <mo>⁢</mo> <mfenced> <mrow> <mi>x</mi> <mo>-</mo> <mn>3</mn> </mrow> </mfenced> </mrow> Regards ~Rob -- Rob Lugt ElCel Technology http://www.elcel.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Entity References, Mike Brown | Thread | [xsl] Prepending Text to Output XML, Avula, Raj |
RE: [xsl] Capitalizing content of a, Joerg Pietschmann | Date | RE: [xsl] document() widlcard?, Michael Kay |
Month |