2 <!-- Copyright (C) 2000, HELM Team -->
4 <!-- This file is part of HELM, an Hypertextual, Electronic -->
5 <!-- Library of Mathematics, developed at the Computer Science -->
6 <!-- Department, University of Bologna, Italy. -->
8 <!-- HELM is free software; you can redistribute it and/or -->
9 <!-- modify it under the terms of the GNU General Public License -->
10 <!-- as published by the Free Software Foundation; either version 2 -->
11 <!-- of the License, or (at your option) any later version. -->
13 <!-- HELM is distributed in the hope that it will be useful, -->
14 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
15 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
16 <!-- GNU General Public License for more details. -->
18 <!-- You should have received a copy of the GNU General Public License -->
19 <!-- along with HELM; if not, write to the Free Software -->
20 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
21 <!-- MA 02111-1307, USA. -->
23 <!-- For details, see the HELM World-Wide-Web page, -->
24 <!-- http://cs.unibo.it/helm/. -->
26 <!--******************************************************************-->
28 <!-- First draft: March 20 2001, Andrea Asperti -->
29 <!--******************************************************************-->
31 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
33 <!-- ************************** LAMBDA ****************************** -->
35 <xsl:param name="CICURI" select="''"/>
36 <xsl:param name="getterURL" select="''"/>
37 <xsl:include href="getter.xsl"/>
38 <xsl:include href="params.xsl"/>
42 <xsl:template match="APPLY[CONST[position()='1' and
43 (@uri='cic:/Algebra/CSemiGroups/csg_crr.con' or
44 @uri='cic:/Algebra/CMonoids/cm_crr.con' or
45 @uri='cic:/Algebra/CGroups/cg_crr.con' or
46 @uri='cic:/Algebra/CRings/cr_crr.con' or
47 @uri='cic:/Algebra/CFields/cf_crr.con' or
48 @uri='cic:/Algebra/COrdFields/cof_crr.con' or
49 @uri='cic:/Algebra/CReals/crl_crr.con')]]">
50 <xsl:apply-templates select="*[position()=last()]"/>
53 <xsl:template match="APPLY[CONST[position()='1' and
54 @uri='cic:/Algebra/CSetoids/CSetoid_functions/csf_fun.con']]">
55 <xsl:variable name="no_params">
56 <xsl:call-template name="get_no_params">
57 <xsl:with-param name="first_uri" select="$CICURI"/>
58 <xsl:with-param name="second_uri" select="CONST[1]/@uri"/>
62 <xsl:when test="(count(child::*) - number($no_params)) = 3">
64 <xsl:when test="name(*[2+$no_params])='APPLY'">
65 <APPLY id="{@id}" sort="{@sort}">
66 <xsl:apply-templates select="*[2+$no_params]/*"/>
67 <xsl:apply-templates select="*[3+$no_params]"/>
71 <APPLY id="{@id}" sort="{@sort}">
72 <xsl:apply-templates select="*[2+$no_params]"/>
73 <xsl:apply-templates select="*[3+$no_params]"/>
79 <APPLY id="{@id}" sort="{@sort}">
80 <xsl:apply-templates select="*"/>
86 <xsl:template match="APPLY[CONST[position()='1' and
87 @uri='cic:/Algebra/CSetoids/CSetoid_functions/csbf_fun.con']]">
88 <xsl:variable name="no_params">
89 <xsl:call-template name="get_no_params">
90 <xsl:with-param name="first_uri" select="$CICURI"/>
91 <xsl:with-param name="second_uri" select="CONST[1]/@uri"/>
95 <xsl:when test="(count(child::*) - number($no_params)) = 4">
97 <xsl:when test="name(*[2+$no_params])='APPLY'">
98 <APPLY id="{@id}" sort="{@sort}">
99 <xsl:apply-templates select="*[2+$no_params]/*"/>
100 <xsl:apply-templates select="*[3+$no_params]"/>
101 <xsl:apply-templates select="*[4+$no_params]"/>
105 <APPLY id="{@id}" sort="{@sort}">
106 <xsl:apply-templates select="*[2+$no_params]"/>
107 <xsl:apply-templates select="*[3+$no_params]"/>
108 <xsl:apply-templates select="*[4+$no_params]"/>
114 <APPLY id="{@id}" sort="{@sort}">
115 <xsl:apply-templates select="*"/>
121 <xsl:template match="APPLY[CONST[position()='1' and
122 @uri='cic:/Algebra/CSetoids/CSetoid_relations_and_predicates/csr_rel.con']]">
123 <xsl:variable name="no_params">
124 <xsl:call-template name="get_no_params">
125 <xsl:with-param name="first_uri" select="$CICURI"/>
126 <xsl:with-param name="second_uri" select="CONST[1]/@uri"/>
130 <xsl:when test="(count(child::*) - number($no_params)) = 4">
132 <xsl:when test="name(*[2+$no_params])='APPLY'">
133 <APPLY id="{@id}" sort="{@sort}">
134 <xsl:apply-templates select="*[2+$no_params]/*"/>
135 <xsl:apply-templates select="*[3+$no_params]"/>
136 <xsl:apply-templates select="*[4+$no_params]"/>
140 <APPLY id="{@id}" sort="{@sort}">
141 <xsl:apply-templates select="*[2+$no_params]"/>
142 <xsl:apply-templates select="*[3+$no_params]"/>
143 <xsl:apply-templates select="*[4+$no_params]"/>
149 <APPLY id="{@id}" sort="{@sort}">
150 <xsl:apply-templates select="*"/>
156 <xsl:template match="APPLY[CONST[position()='1' and
157 @uri='cic:/Algebra/CRings/nat_injection/nring.con']]">
158 <xsl:variable name="no_params">
159 <xsl:call-template name="get_no_params">
160 <xsl:with-param name="first_uri" select="$CICURI"/>
161 <xsl:with-param name="second_uri" select="CONST[1]/@uri"/>
165 <xsl:when test="(count(child::*) - number($no_params)) = 2">
166 <xsl:apply-templates select="*[2+$no_params]"/>
169 <APPLY id="{@id}" sort="{@sort}">
170 <xsl:apply-templates select="*"/>
176 <xsl:template match = "/|*">
178 <xsl:copy-of select="@*"/>
179 <xsl:apply-templates select="*"/>