</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
- <!-- <xsl:value-of select="document(concat(string($absPath),@uri))/*/@name"/> -->
</m:ci>
</xsl:template>
<xsl:template match="MUTIND" mode="pure">
<m:ci definitionURL="{@uri}" helm:xref="{@id}">
+ <xsl:variable name="InductiveTypeUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
<xsl:variable name="index"><xsl:value-of select="@noType"/></xsl:variable>
- <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($index)+1]/@name"/></xsl:with-param></xsl:call-template>
+ <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="document($InductiveTypeUrl)/InductiveDefinition/InductiveType[position()=number($index)+1]/@name"/></xsl:with-param></xsl:call-template>
</m:ci>
</xsl:template>
<xsl:template match="MUTCONSTRUCT" mode="pure">
<m:ci definitionURL="{@uri}" helm:xref="{@id}">
+ <xsl:variable name="InductiveTypeUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
<xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
<xsl:variable name="Cindex"><xsl:value-of select="@noConstr"/></xsl:variable>
- <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="document(concat(string($absPath),@uri))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($Cindex)]/@name"/></xsl:with-param></xsl:call-template>
+ <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="document($InductiveTypeUrl)/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($Cindex)]/@name"/></xsl:with-param></xsl:call-template>
</m:ci>
</xsl:template>
<xsl:template match="MUTCASE" mode="pure">
<xsl:variable name="Tindex"><xsl:value-of select="@noType"/></xsl:variable>
<xsl:variable name="Turi"><xsl:value-of select="@uriType"/></xsl:variable>
+ <xsl:variable name="InductiveTypeUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="$Turi"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="InductiveTypeDoc" select="document($InductiveTypeUrl)"/>
<m:apply helm:xref="{@id}">
<m:csymbol>mutcase</m:csymbol>
<xsl:apply-templates select="patternsType/*[1]" mode="noannot"/>
<xsl:apply-templates select="inductiveTerm/*[1]" mode="noannot"/>
- <xsl:variable name="nop"><xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/@noParams"/></xsl:variable>
+ <xsl:variable name="nop"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/@noParams"/></xsl:variable>
<piecewise>
<xsl:for-each select="pattern">
<xsl:variable name="pos" select="position()"/>
- <xsl:variable name="nopar"><xsl:apply-templates select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
+ <xsl:variable name="nopar"><xsl:apply-templates select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/*[1]" mode="counting"><xsl:with-param name="noparams" select="$nop"/></xsl:apply-templates></xsl:variable>
<piece>
<xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="target" select="1"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
<xsl:choose>
<xsl:when test="$nopar = 0">
<m:ci>
- <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
+ <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
</m:ci>
</xsl:when>
<xsl:otherwise>
<m:apply>
<m:csymbol>app</m:csymbol>
<m:ci>
- <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="document(concat(string($absPath),$Turi))/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
+ <xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="$InductiveTypeDoc/InductiveDefinition/InductiveType[position()=number($Tindex)+1]/Constructor[position()=number($pos)]/@name"/></xsl:with-param></xsl:call-template>
</m:ci>
<xsl:apply-templates select="./*[1]" mode="abstparams"><xsl:with-param name="noparams" select="$nopar"/><xsl:with-param name="binder">LAMBDA</xsl:with-param></xsl:apply-templates>
</m:apply>
<xsl:param name="CICURI" select="''"/>
<xsl:param name="getterURL" select="''"/>
-<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
+<xsl:include href="getter.xsl"/>
<xsl:include href="params.xsl"/>
<!-- coercions -->
--- /dev/null
+<?xml version="1.0"?>
+
+<!-- Copyright (C) 2000, HELM Team -->
+<!-- -->
+<!-- This file is part of HELM, an Hypertextual, Electronic -->
+<!-- Library of Mathematics, developed at the Computer Science -->
+<!-- Department, University of Bologna, Italy. -->
+<!-- -->
+<!-- HELM is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License -->
+<!-- as published by the Free Software Foundation; either version 2 -->
+<!-- of the License, or (at your option) any later version. -->
+<!-- -->
+<!-- HELM is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with HELM; if not, write to the Free Software -->
+<!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
+<!-- MA 02111-1307, USA. -->
+<!-- -->
+<!-- For details, see the HELM World-Wide-Web page, -->
+<!-- http://cs.unibo.it/helm/. -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template name="URLofURI4getter">
+ <xsl:param name="uri" select="''"/>
+ <xsl:value-of select="$getterURL"/>getxml?uri=<xsl:value-of select="$uri"/>
+</xsl:template>
+
+</xsl:stylesheet>
<xsl:template mode="inline" match="m:set">
<xsl:variable name="uri" select="@definitionURL"/>
-<!-- <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
- </xsl:variable>-->
<xsl:choose>
<xsl:when test="count(child::*) = 0">
<xsl:call-template name="mksymbol">
<xsl:param name="current_indent" select="0"/>
<xsl:param name="width" select="$framewidth"/>
<xsl:variable name="uri" select="@definitionURL"/>
-<!-- <xsl:value-of select="concat(string($absPath), @definitionURL)"/>
- </xsl:variable>-->
<xsl:choose>
<xsl:when test="count(child::*) = 0">
<xsl:call-template name="mksymbol">
<xsl:param name="section_params" select="0"/>
<!-- expected_args_type contains the types of the arguments expected by
the induction principle -->
+ <xsl:variable name="InductiveTypeUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="*[1]/@uri"/></xsl:call-template></xsl:variable>
<xsl:variable name="expected_args_types"
- select="document(concat(string($absPath),*[1]/@uri))/Definition/type//PROD[not(ancestor::source)]/source/*[1]"/>
+ select="document($InductiveTypeUrl)/Definition/type//PROD[not(ancestor::source)]/source/*[1]"/>
<xsl:variable name="no_expected_args" select="count($expected_args_types)"/>
<xsl:variable name="actual_arguments" select="*[position()>(1+$section_params)]"/>
<!-- First check that the induction principle is applied to the
<xsl:import href="objcontent.xsl"/>
<xsl:include href="headercontent.xsl"/>
+<xsl:include href="getter.xsl"/>
<xsl:param name="type" select="'standalone'"/>
<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
<xsl:param name="CICURI" select="''"/>
-<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
<!-- CIC DEFINITION -->
<xsl:choose>
<xsl:when test="$offset > 0">
<xsl:variable name="params">
+ <xsl:variable name="second_url"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="$second_uri"/></xsl:call-template></xsl:variable>
<xsl:value-of
- select="document(concat(string($absPath),$second_uri))/*/@params"/>
+ select="document($second_url)/*/@params"/>
</xsl:variable>
<xsl:variable name="minimum">
<xsl:call-template name="min">
<xsl:when test="contains($uri,'_ind.con')">
<xsl:variable name="ind_uri"
select="concat(substring-before($uri,'_ind.con'),'.ind')"/>
+ <xsl:variable name="InductiveTypeUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="$ind_uri"/></xsl:call-template></xsl:variable>
<xsl:variable name="inductive_def"
- select="document(concat(string($absPath),$ind_uri))/InductiveDefinition"/>
+ select="document($InductiveTypeUrl)/InductiveDefinition"/>
<!-- check if the corresponding inductive definition actually
exists -->
<xsl:choose>
<xsl:output method="html"/>
+<!-- CSC: absPath is the old way to retrieve a file. The new one is using -->
+<!-- URLofURI4getter, defined in getter.xsl -->
<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
<xsl:template match="/">
<xsl:import href="annotatedcont.xsl"/>
<xsl:import href="links_library.xsl"/>
+<xsl:import href="getter.xsl"/>
<xsl:param name="getterURL" select="'http://localhost:8081/'"/>
<xsl:param name="processorURL" select="'http://localhost:8080/helm/servlet/uwobo/'"/>
<xsl:param name="annotations" select="'no'"/>
<xsl:param name="CICURI" select="''"/>
-<xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
-
<xsl:variable name="InnerTypesUri"><xsl:value-of select="concat($CICURI,'.types')"/></xsl:variable>
+<xsl:variable name="AnnotationsUri"><xsl:value-of select="concat($CICURI,'.ann')"/></xsl:variable>
<xsl:variable name="InnerTypesUrl"><xsl:call-template name="makeURL4InnerTypes"><xsl:with-param name="uri" select="$InnerTypesUri"/></xsl:call-template></xsl:variable>
+<xsl:variable name="AnnotationsUrl"><xsl:call-template name="URLofURI4getter"><xsl:with-param name="uri" select="$AnnotationsUri"/></xsl:call-template></xsl:variable>
<!-- WARNING: Using lazy evaluation: $CICURI.* may not exist, but -->
<!-- document() is called only by need!!! -->
-<!-- <xsl:variable name="InnerTypes" select="document(concat($absPath,$CICURI,'.types'))"/> -->
<xsl:variable name="InnerTypes" select="document($InnerTypesUrl)"/>
-<xsl:variable name="CICAnnotations" select="document(concat($absPath,$CICURI,'.ann'))"/>
+<xsl:variable name="CICAnnotations" select="document($AnnotationsUrl)"/>
<xsl:include href="headercontent.xsl"/>
<xsl:include href="proofs.xsl"/>