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=
"lang"/> <!-- language of the variant being generated -->
23 <xsl:param name=
"side"/> <!-- one of 'left' or 'right' -->
25 <xsl:template match=
"alphabet">
26 <alphabet><xsl:apply-templates/></alphabet>
29 <xsl:template match=
"sdefs">
31 <xsl:apply-templates/>
35 <xsl:template match=
"sdef">
39 <xsl:template match=
"pardefs">
41 <xsl:apply-templates/>
45 <xsl:template match=
"pardef">
47 <xsl:apply-templates/>
51 <xsl:template match=
"e">
53 <xsl:when test=
"./@v=$lang">
55 <xsl:when test=
"count(./@r)=0">
57 <xsl:apply-templates/>
62 <xsl:apply-templates/>
67 <xsl:when test=
"not(count(./@v)=0) and not(./@v=$lang)">
69 <xsl:when test=
"$side=string('left')">
71 <xsl:apply-templates/>
75 <xsl:if test=
"not(./@r=string('LR'))">
77 <xsl:apply-templates/>
85 <xsl:when test=
"not(count(./@r))=0">
87 <xsl:apply-templates/>
92 <xsl:apply-templates/>
100 <xsl:template match=
"p">
102 <xsl:apply-templates/>
106 <xsl:template match=
"l">
107 <l><xsl:apply-templates/></l>
110 <xsl:template match=
"r">
111 <r><xsl:apply-templates/></r>
114 <xsl:template match=
"s">
118 <xsl:template match=
"b">
122 <xsl:template match=
"j">
126 <xsl:template match=
"a">
130 <xsl:template match=
"re">
131 <re><xsl:apply-templates/></re>
134 <xsl:template match=
"section">
135 <section id=
"{./@id}" type=
"{./@type}">
136 <xsl:apply-templates/>
140 <xsl:template match=
"i">
142 <xsl:apply-templates/>
146 <xsl:template match=
"g"><g><xsl:apply-templates/></g></xsl:template>
148 <xsl:template match=
"par">
152 <xsl:template match=
"dictionary">
154 <xsl:apply-templates/>