3 Copyright (C) 2002-2003, Luca Padovani <luca.padovani@cs.unibo.it>,
4 2003, Paolo Marinelli <pmarinel@cs.unibo.it>.
6 This file is part of EdiTeX, an editor of mathematical
7 expressions based on TeX syntax
9 EdiTeX is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
14 EdiTeX is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with EdiTeX; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 For details, see the EdiTeX World-Wide-Web page,
24 http://helm.cs.unibo.it/editex, or send a mail to
25 <luca.padovani@cs.unibo.it>
29 xmlns:xsl2="http://www.w3.org/1999/XSL/Transform"
30 xmlns:xsl="http://www.w3.org/1999/XSL/TransformAlias"
31 xmlns:tml="http://helm.cs.unibo.it/2002/TML">
33 <xsl:namespace-alias stylesheet-prefix="xsl" result-prefix="xsl2"/>
35 <xsl2:template match="/">
36 <xsl:stylesheet version="1.0">
37 <xsl:template match="tml:tex">
38 <xsl:apply-templates select="*"/>
41 <xsl:template match="tml:i">
42 <xsl:element name="xxx">
44 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
46 <xsl:value-of select="@val"/>
50 <xsl:template match="tml:n">
51 <xsl:element name="xxx">
53 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
55 <xsl:value-of select="@val"/>
59 <xsl:template match="tml:o">
60 <xsl:element name="xxx">
62 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
64 <xsl:value-of select="@val"/>
68 <xsl:template match="tml:cursor">
69 <xsl:element name="xxx">
71 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
73 <xsl:value-of select="@val"/>
77 <xsl:template match="tml:sb[@under='1']">
78 <xsl:element name="xxx">
80 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
82 <xsl:apply-templates select="*[1]"/>
83 <xsl:apply-templates select="*[2]"/>
87 <xsl:template match="tml:sb">
88 <xsl:element name="xxx">
90 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
92 <xsl:apply-templates select="*[1]"/>
93 <xsl:apply-templates select="*[2]"/>
97 <xsl:template match="tml:sb[@over='1']">
98 <xsl:element name="xxx">
100 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
102 <xsl:apply-templates select="*[1]"/>
103 <xsl:apply-templates select="*[2]"/>
107 <xsl:template match="tml:sp">
108 <xsl:element name="xxx">
110 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
112 <xsl:apply-templates select="*[1]"/>
113 <xsl:apply-templates select="*[2]"/>
117 <xsl:template match="tml:g[@id]">
118 <xsl:element name="xxx">
119 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
120 <xsl:apply-templates select="*"/>
124 <xsl:template match="tml:g">
125 <xsl:element name="xxx">
126 <xsl:apply-templates select="*"/>
130 <xsl:template match="tml:row">
131 <xsl:apply-templates select="cell"/>
134 <xsl:template match="tml:cell">
135 <xsl:apply-templates select="*"/>
138 <xsl2:comment>/// CONTROL SEQUENCES ///</xsl2:comment>
140 <xsl2:apply-templates/>
144 <xsl2:template match="entry[not(@class) or @class='m']">
145 <xsl:template match="tml:c[@name='{@name}']">
146 <xsl2:comment><xsl2:value-of select="concat(' ',@name,' ')"/></xsl2:comment>
147 <xsl:element name="xxx">
149 <xsl:attribute name="xref"><xsl:value-of select="@id"/></xsl:attribute>
151 <xsl:apply-templates select="*"/>