1 <?xml version=
"1.0" encoding=
"UTF-8"?> <!-- -*- nxml -*- -->
3 Copyright (C) 2005 Universitat d'Alacant / Universidad de Alicante
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
21 <xsl:output method=
"xml" encoding=
"UTF-8"/>
22 <xsl:param name=
"r2l"/>
24 <xsl:template match=
"s">
28 <xsl:template match=
"b">
32 <xsl:template match=
"g">
33 <g><xsl:apply-templates/></g>
36 <xsl:template match=
"a">
40 <xsl:template match=
"j">
44 <xsl:template match=
"l">
45 <xsl:apply-templates select=
"./*|text()"/>
48 <xsl:template match=
"r">
49 <xsl:apply-templates select=
"./*|text()"/>
52 <xsl:template match=
"par">
56 <xsl:template match=
"re">
57 <re><xsl:apply-templates/></re>
60 <xsl:template match=
"p">
63 <xsl:when test=
"not(count(../@slr)=0)">
64 <l><xsl:apply-templates select=
"./l/text()|./l/*[not(name(.)=string('s'))]"/>:
<xsl:apply-templates select=
"../@slr"/><xsl:apply-templates select=
"./l/*[name(.)=string('s')]"/></l>
67 <l><xsl:apply-templates select=
"./l/*|./l/text()"/></l>
70 <r><xsl:apply-templates select=
"./r/*|./r/text()"/></r>
75 <xsl:template match=
"i">
78 <xsl:when test=
"not(count(../@slr)=0)">
79 <l><xsl:apply-templates select=
"text()|*[not(name(.)=string('s'))]"/>:
<xsl:apply-templates select=
"../@slr"/><xsl:apply-templates select=
"*[name(.)=string('s')]"/></l>
82 <l><xsl:apply-templates select=
"*|text()"/></l>
85 <r><xsl:apply-templates select=
"*|text()"/></r>
90 <xsl:template match=
"e">
92 <xsl:when test=
"not(count(./@r)=0)">
93 <e r=
"{./@r}"><xsl:apply-templates select=
"./*"/></e>
96 <e><xsl:apply-templates select=
"./*"/></e>
102 <xsl:template match=
"dictionary">
104 <xsl:value-of select=
"string('
')"/>
105 <xsl:copy-of select=
"./alphabet"/>
106 <xsl:value-of select=
"string('
')"/>
107 <xsl:copy-of select=
"./sdefs"/>
108 <xsl:value-of select=
"string('
')"/>
109 <xsl:if test=
"not(count(./pardefs/pardef)=0)">
111 <xsl:value-of select=
"string('
')"/>
113 <xsl:for-each select=
"./pardefs/pardef">
114 <xsl:value-of select=
"string('
')"/>
117 <xsl:apply-templates/>
120 <xsl:value-of select=
"string('
')"/>
124 <xsl:value-of select=
"string('
')"/>
126 <xsl:for-each select=
"./section">
127 <section id=
"{./@id}" type=
"{./@type}">
128 <xsl:apply-templates/>