[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Entity References

Subject: Entity References
From: "Werner Hager" <eryndel@xxxxxxxx>
Date: Tue, 7 Aug 2001 09:54:32 -0700
hager templates
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>&InvisibleTimes;</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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.