home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet default-space='strip'
- xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
-
- <!--
- This specifies just enough of the MathML presentation elements
- to process the example, math.xml.
- -->
-
- <xsl:template match="/">
- <xsl:pi name="xml">version="1.0" encoding="UTF-8"</xsl:pi>
- <TeXML>
- <cmd name="documentclass">
- <parm>article</parm>
- </cmd>
- <cmd name="title">
- <parm><xsl:text>Some Math</xsl:text></parm>
- </cmd>
- <env name="document">
- <cmd name="maketitle"/>
- <cmd name="["/>
- <xsl:apply-templates/>
- <cmd name="]"/>
- </env>
- </TeXML>
- </xsl:template>
-
- <xsl:template match="mo">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="mi">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="msup">
- <group>
- <xsl:apply-templates select="*[position()=1]"/>
- </group>
- <spec cat="sup"/>
- <group>
- <xsl:apply-templates select="*[last()]"/>
- </group>
- </xsl:template>
-
- <xsl:template match="mfenced">
- <xsl:text>(</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>)</xsl:text>
- </xsl:template>
-
- <xsl:template match="mrow">
- <group>
- <xsl:apply-templates/>
- </group>
- </xsl:template>
-
- </xsl:stylesheet>
-