[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Entity References
Greetings List, 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> <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> And this is the XSLT I have so far <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> <xsl:template match="/"> <mstyle scriptminsize="36pt" width="5mm"> <xsl:apply-templates/> </mstyle> </xsl:template> <xsl:template match="mi"> <mi fontstyle="normal"> <xsl:apply-templates/> </mi> </xsl:template> <xsl:template match="mfenced"> <mfenced> <mspace/> <xsl:apply-templates/> </mfenced> </xsl:template> <xsl:template match="*|@*|text()"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> 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? Thank you, Werner Hager ---------------------------------------------- Science Access Project Oregon State University werner@xxxxxxxxxxxxxxxxxxxxx ---------------------------------------------- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|