<oxsl:include href="{@href}"/>
</xsl:template>
+
<xsl:template match="Operator|NotOperator">
<xsl:variable name="uri">
<xsl:call-template name="remove_white_spaces">
<xsl:with-param name="c-tag" select="'CONST'"/>
</xsl:call-template>
</xsl:variable>
-
+
<!-- All uris in uri2 list (if not empty) have MUTIND c-tag -->
<xsl:variable name="uri2">
<xsl:call-template name="select_uris">
<xsl:with-param name="name" select="@name"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="uri" select="$uri1"/>
- <xsl:with-param name="cook" select="@cook"/>
<xsl:with-param name="hide" select="@hide"/>
<xsl:with-param name="arity" select="@arity"/>
<xsl:with-param name="m-tag" select="@m-tag"/>
<xsl:with-param name="c-tag" select="'CONST'"/>
</xsl:call-template>
+ <xsl:if test="@cook = 'true'">
+ <xsl:call-template name="out_template">
+ <xsl:with-param name="name" select="@name"/>
+ <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="uri" select="$uri1"/>
+ <xsl:with-param name="cook" select="@cook"/>
+ <xsl:with-param name="hide" select="@hide"/>
+ <xsl:with-param name="arity" select="@arity"/>
+ <xsl:with-param name="m-tag" select="@m-tag"/>
+ <xsl:with-param name="c-tag" select="'CONST'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:if>
<xsl:if test="$uri2 != ''">
<xsl:with-param name="name" select="@name"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="uri" select="$uri2"/>
- <xsl:with-param name="cook" select="@cook"/>
<xsl:with-param name="hide" select="@hide"/>
<xsl:with-param name="arity" select="@arity"/>
<xsl:with-param name="m-tag" select="@m-tag"/>
<xsl:with-param name="c-tag" select="'MUTIND'"/>
</xsl:call-template>
+ <xsl:if test="@cook = 'true'">
+ <xsl:call-template name="out_template">
+ <xsl:with-param name="name" select="@name"/>
+ <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="uri" select="$uri2"/>
+ <xsl:with-param name="cook" select="@cook"/>
+ <xsl:with-param name="hide" select="@hide"/>
+ <xsl:with-param name="arity" select="@arity"/>
+ <xsl:with-param name="m-tag" select="@m-tag"/>
+ <xsl:with-param name="c-tag" select="'MUTIND'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:with-param name="name" select="@name"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="uri" select="$uri1"/>
- <xsl:with-param name="cook" select="@cook"/>
<xsl:with-param name="hide" select="@hide"/>
<xsl:with-param name="m-tag" select="@m-tag"/>
<xsl:with-param name="c-tag" select="'CONST'"/>
</xsl:call-template>
+ <xsl:if test="@cook = 'true'">
+ <xsl:call-template name="out_template_set">
+ <xsl:with-param name="name" select="@name"/>
+ <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="uri" select="$uri1"/>
+ <xsl:with-param name="cook" select="@cook"/>
+ <xsl:with-param name="hide" select="@hide"/>
+ <xsl:with-param name="m-tag" select="@m-tag"/>
+ <xsl:with-param name="c-tag" select="'CONST'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:if>
<xsl:if test="$uri2 != ''">
<xsl:with-param name="name" select="@name"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="uri" select="$uri2"/>
- <xsl:with-param name="cook" select="@cook"/>
<xsl:with-param name="hide" select="@hide"/>
<xsl:with-param name="m-tag" select="@m-tag"/>
<xsl:with-param name="c-tag" select="'MUTIND'"/>
</xsl:call-template>
+ <xsl:if test="@cook = 'true'">
+ <xsl:call-template name="out_template_set">
+ <xsl:with-param name="name" select="@name"/>
+ <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="uri" select="$uri2"/>
+ <xsl:with-param name="cook" select="@cook"/>
+ <xsl:with-param name="hide" select="@hide"/>
+ <xsl:with-param name="m-tag" select="@m-tag"/>
+ <xsl:with-param name="c-tag" select="'MUTIND'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:param name="arity" select="0"/>
<xsl:param name="m-tag"/>
<xsl:param name="c-tag"/>
-
- <xsl:variable name="apply_not">
- <xsl:if test="$not = 'true'">*[2]/</xsl:if>
- </xsl:variable>
-
+
<xsl:variable name="match">
<xsl:call-template name="out_match">
<xsl:with-param name="not" select="$not"/>
</xsl:call-template>
</xsl:variable>
- <xsl:variable name="op_uri_attr">
- <xsl:variable name="tmp_op_uri_attr">
- <xsl:call-template name="op_uri_attr">
- <xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="c-tag" select="$c-tag"/>
- <xsl:with-param name="const" select="$arity = 0 and $hide = 0"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="substring-after(substring-before($tmp_op_uri_attr,'}'),'{')"/>
- </xsl:variable>
-
<!-- TEMPLATE -->
<xsl:call-template name="out_comment">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
<oxsl:template match="{$match}" mode="pure">
- <xsl:choose>
- <xsl:when test="$cook = 'true'">
- <oxsl:variable name="no_params">
- <oxsl:variable name="no_params_tmp">
- <oxsl:call-template name="get_no_params">
- <oxsl:with-param name="first_uri" select="$CICURI"/>
- <oxsl:with-param name="second_uri" select="{$op_uri_attr}"/>
- </oxsl:call-template>
- </oxsl:variable>
- <oxsl:value-of select="number($no_params_tmp)"/>
- </oxsl:variable>
- <oxsl:choose>
- <oxsl:when test="{concat('count(',$apply_not,'*) = $no_params + ',$arity + $hide + 1)}">
- <xsl:call-template name="out_body">
- <xsl:with-param name="c-tag" select="$c-tag"/>
- <xsl:with-param name="m-tag" select="$m-tag"/>
- <xsl:with-param name="cook" select="$cook"/>
- <xsl:with-param name="hide" select="$hide"/>
- <xsl:with-param name="arity" select="$arity"/>
- <xsl:with-param name="not" select="$not"/>
- </xsl:call-template>
- </oxsl:when>
- <oxsl:otherwise>
- <oxsl:apply-imports/>
- </oxsl:otherwise>
- </oxsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="out_body">
- <xsl:with-param name="c-tag" select="$c-tag"/>
- <xsl:with-param name="m-tag" select="$m-tag"/>
- <xsl:with-param name="cook" select="$cook"/>
- <xsl:with-param name="hide" select="$hide"/>
- <xsl:with-param name="arity" select="$arity"/>
- <xsl:with-param name="not" select="$not"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:call-template name="out_body">
+ <xsl:with-param name="c-tag" select="$c-tag"/>
+ <xsl:with-param name="m-tag" select="$m-tag"/>
+ <xsl:with-param name="cook" select="$cook"/>
+ <xsl:with-param name="hide" select="$hide"/>
+ <xsl:with-param name="arity" select="$arity"/>
+ <xsl:with-param name="not" select="$not"/>
+ </xsl:call-template>
</oxsl:template>
</xsl:template>
<xsl:param name="m-tag"/>
<xsl:param name="c-tag"/>
- <xsl:variable name="no_params_var">
- <xsl:if test="$cook = 'true'">$no_params + </xsl:if>
- </xsl:variable>
-
<xsl:variable name="match">
<xsl:call-template name="out_match_op">
- <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="uri" select="$uri"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="op_uri_attr">
- <xsl:variable name="tmp_op_uri_attr">
- <xsl:call-template name="op_uri_attr">
- <xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="c-tag" select="$c-tag"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="substring-after(substring-before($tmp_op_uri_attr,'}'),'{')"/>
+ <xsl:call-template name="op_uri_attr">
+ <xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="c-tag" select="$c-tag"/>
+ </xsl:call-template>
</xsl:variable>
</xsl:call-template>
<oxsl:template match="{concat('APPLY[',$match,']')}" mode="pure">
- <xsl:if test="$cook = 'true'">
- <oxsl:variable name="no_params">
- <oxsl:variable name="no_params_tmp">
- <oxsl:call-template name="get_no_params">
- <oxsl:with-param name="first_uri" select="$CICURI"/>
- <oxsl:with-param name="second_uri" select="{$op_uri_attr}"/>
- </oxsl:call-template>
- </oxsl:variable>
- <oxsl:value-of select="number($no_params_tmp)"/>
- </oxsl:variable>
- </xsl:if>
<oxsl:choose>
<xsl:for-each select="Case">
- <oxsl:when test="{concat('count(',$apply_not,'*) = ',$no_params_var,@arity + $hide + 1)}">
+ <oxsl:when test="{concat('count(',$apply_not,'*) = ',@arity + $hide + 1)}">
<xsl:call-template name="out_body">
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="m-tag" select="$m-tag"/>
<xsl:template name="out_match_op">
<xsl:param name="not" select="'false'"/>
<xsl:param name="uri"/>
+ <xsl:param name="cook" select="'false'"/>
<xsl:param name="c-tag"/>
+
+ <xsl:variable name="instantiate">
+ <xsl:if test="$cook = 'true'">instantiate/</xsl:if>
+ </xsl:variable>
<!-- application with not operator -->
<xsl:variable name="app_not">
<xsl:variable name="app_op">
<xsl:if test="$not = 'true'">APPLY[</xsl:if>
- <xsl:value-of select="concat($c-tag,'[',$uris,']')"/>
+ <xsl:value-of select="concat($instantiate,$c-tag,'[',$uris,']')"/>
<xsl:if test="$not = 'true'">]</xsl:if>
</xsl:variable>
<xsl:value-of select="concat($app_not,$app_op)"/>
</xsl:template>
+
<!-- Returns a test on apply node children number-->
<xsl:template name="out_match_child">
<xsl:param name="not" select="'false'"/>
- <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:param name="arity" select="0"/>
- <!--
- Test on children number only if the operator is concatenated with not of
- if it is not constant and it has not to be cooked.
- It is not possible to concatenate a constant operator with not.
- -->
- <xsl:if test="$not = 'true' or (($arity != 0 or $hide != 0) and $cook = 'false')">
+ <!-- Test on children number only if the operator is not constant -->
+ <xsl:if test="$arity != 0 or $hide != 0">
<xsl:choose>
<!-- if the operator has been concatenated with not, the root apply node must have only two child -->
<xsl:when test="$not = 'true'">
- <xsl:variable name="test_apply_children">
- <xsl:if test="$cook = 'false'">
- <xsl:value-of select="concat(' and count(*[2]/*) = ',$arity + $hide + 1)"/>
- </xsl:if>
- </xsl:variable>
-
- <xsl:value-of select="concat('count(*) = 2',$test_apply_children)"/>
+ <xsl:value-of select="concat('count(*) = 2 and count(*[2]/*) = ',$arity + $hide + 1)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('count(*) = ',$arity + $hide + 1)"/>
<xsl:call-template name="out_match_op">
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="uri" select="$uri"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
</xsl:call-template>
<xsl:variable name="match_child">
<xsl:call-template name="out_match_child">
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
</xsl:call-template>
<xsl:template name="out_params">
<xsl:param name="params" select="1"/>
- <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:param name="not" select="'false'"/>
<xsl:param name="mode" select="'noannot'"/>
<xsl:call-template name="param">
<xsl:with-param name="id" select="$params"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="out_params">
<xsl:with-param name="params" select="$params + 1"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="mode" select="$mode"/>
</xsl:if>
</xsl:template>
-
<xsl:template name="out_body">
<xsl:param name="c-tag"/>
<xsl:param name="cook" select="'false'"/>
<xsl:variable name="definitionURL">
<xsl:call-template name="op_uri_attr">
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$arity = 0 and $hide = 0"/>
</xsl:call-template>
<xsl:variable name="helm:xref">
<xsl:call-template name="op_id_attr">
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$arity = 0 and $hide = 0"/>
</xsl:call-template>
</xsl:element>
<!-- PARAMS -->
<xsl:call-template name="out_params">
- <xsl:with-param name="cook" select="$cook"/>
- <xsl:with-param name="hide" select="$hide"/>
+ <xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="arity" select="$arity"/>
</xsl:call-template>
</xsl:choose>
</xsl:template>
+
<xsl:template name="out_mvar">
<xsl:param name="vname"/>
<xsl:template name="out_choose_binder">
<xsl:param name="binded_params" select="''"/>
<xsl:param name="not" select="'false'"/>
- <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:param name="binder"/>
<xsl:call-template name="out_choose_binder">
<xsl:with-param name="binded_params" select="substring-before($binded_params,'+')"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="binder" select="$binder"/>
</xsl:call-template>
<xsl:call-template name="out_choose_binder">
<xsl:with-param name="binded_params" select="substring-after($binded_params,'+')"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="binder" select="$binder"/>
</xsl:call-template>
<xsl:call-template name="param">
<xsl:with-param name="id" select="$binded_params"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
</xsl:if>
</xsl:template>
+
<!-- *********************************************************************** -->
<!-- META LANGUAGE FOR MathML -->
<!-- *********************************************************************** -->
<xsl:call-template name="set_attribute">
<xsl:with-param name="attr" select="@xref"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
<xsl:with-param name="not" select="$not"/>
<m:apply helm:xref="{$helm:xref}">
<xsl:call-template name="copy_attributes">
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
</m:apply>
</xsl:template>
-
<xsl:template match="mop">
<xsl:param name="c-tag"/>
<xsl:param name="cook" select="'false'"/>
<xsl:when test="@definitionURL">
<xsl:call-template name="set_attribute">
<xsl:with-param name="attr" select="@definitionURL"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
<xsl:otherwise>
<xsl:call-template name="op_uri_attr">
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$arity = 0 and $hide = 0"/>
</xsl:call-template>
<xsl:when test="@xref">
<xsl:call-template name="set_attribute">
<xsl:with-param name="attr" select="@xref"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
<xsl:otherwise>
<xsl:call-template name="op_id_attr">
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$arity = 0 and $hide = 0"/>
</xsl:call-template>
</xsl:attribute>
<xsl:call-template name="copy_attributes">
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
</xsl:element>
</xsl:template>
+
<xsl:template match="param">
- <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:param name="not" select="'false'"/>
<xsl:call-template name="param">
<xsl:with-param name="id" select="@id"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
</xsl:choose>
</xsl:template>
+
<xsl:template match="m:*">
<xsl:param name="c-tag"/>
<xsl:param name="cook" select="'false'"/>
<xsl:copy>
<xsl:call-template name="copy_attributes">
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
</xsl:copy>
</xsl:template>
+
<xsl:template match="mbvar">
<xsl:param name="c-tag"/>
<xsl:param name="cook" select="'false'"/>
<xsl:call-template name="test_on_lambda">
<xsl:with-param name="binded_params" select="$binded_params"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
- <xsl:variable name="binder">/target/@binder</xsl:variable>
+ <xsl:variable name="binder">/decl/@binder</xsl:variable>
<xsl:choose>
<xsl:when test="$binded_params != ''">
<xsl:with-param name="binded_params" select="$binded_params"/>
<xsl:with-param name="not" select="$not"/>
<xsl:with-param name="hide" select="$hide"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="binder" select="$binder"/>
</xsl:call-template>
</oxsl:choose>
- </oxsl:variable>
+ </oxsl:variable>
<oxsl:call-template name="insert_subscript">
<oxsl:with-param name="node_value" select="$binder"/>
</oxsl:call-template>
<xsl:call-template name="param">
<xsl:with-param name="id" select="$binded_params"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
- </xsl:variable>
-
+ </xsl:variable>
+
<oxsl:call-template name="insert_subscript">
<oxsl:with-param name="node_value" select="{concat($param,$binder)}"/>
</oxsl:call-template>
</xsl:choose>
</xsl:template>
+
+
<xsl:template match="mvar">
<xsl:call-template name="out_mvar">
<xsl:with-param name="vname" select="@name"/>
</xsl:template>
-
<!-- *********************************************************************** -->
<!-- AUXILIARY FUNCTIONS -->
<!-- *********************************************************************** -->
<xsl:template name="test_on_lambda">
<xsl:param name="binded_params" select="''"/>
<xsl:param name="not" select="'false'"/>
- <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:if test="$binded_params != ''">
<xsl:call-template name="test_on_lambda">
<xsl:with-param name="binded_params" select="substring-before($binded_params,'+')"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="test_on_lambda">
<xsl:with-param name="binded_params" select="substring-after($binded_params,'+')"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="param">
<xsl:with-param name="id" select="$binded_params"/>
<xsl:with-param name="not" select="$not"/>
- <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="hide" select="$hide"/>
</xsl:call-template>
</xsl:variable>
<xsl:template name="param">
<xsl:param name="id"/>
<xsl:param name="not" select="'false'"/>
- <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:variable name="apply_not">
<xsl:if test="$not = 'true'">*[2]/</xsl:if>
</xsl:variable>
- <xsl:variable name="no_params_var">
- <xsl:if test="$cook = 'true'">$no_params+</xsl:if>
- </xsl:variable>
-
- <xsl:value-of select="concat($apply_not,'*[',$no_params_var,$id + $hide + 1,']')"/>
+ <xsl:value-of select="concat($apply_not,'*[',$id + $hide + 1,']')"/>
</xsl:template>
<!-- Returns a xpath string with the location of the operator uri attribute -->
<xsl:template name="op_uri_attr">
<xsl:param name="not" select="'false'"/>
+ <xsl:param name="cook" select="'false'"/>
<xsl:param name="c-tag"/>
<xsl:param name="const" select="'false'"/>
<xsl:call-template name="op_attr">
<xsl:with-param name="attr_type" select="'@uri'"/>
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$const"/>
</xsl:call-template>
<!-- Returns a xpath string with the location of the operator id attribute -->
<xsl:template name="op_id_attr">
<xsl:param name="not" select="'false'"/>
+ <xsl:param name="cook" select="'false'"/>
<xsl:param name="c-tag"/>
<xsl:param name="const" select="'false'"/>
<xsl:call-template name="op_attr">
<xsl:with-param name="attr_type" select="'@id'"/>
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$const"/>
</xsl:call-template>
<xsl:template name="op_attr">
<xsl:param name="attr_type"/>
<xsl:param name="not" select="'false'"/>
+ <xsl:param name="cook" select="'false'"/>
<xsl:param name="c-tag"/>
<xsl:param name="const" select="'false'"/>
+
+ <xsl:variable name="instantiate">
+ <xsl:if test="$cook = 'true'">instantiate/</xsl:if>
+ </xsl:variable>
<xsl:variable name="apply">
<xsl:if test="$not = 'true'">APPLY/</xsl:if>
<xsl:value-of select="concat('{',$attr_type,'}')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="concat('{',$apply,$c-tag,'/',$attr_type,'}')"/>
+ <xsl:value-of select="concat('{',$apply,$instantiate,$c-tag,'/',$attr_type,'}')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="copy_attributes">
+ <xsl:param name="cook" select="'false'"/>
<xsl:param name="c-tag"/>
<xsl:param name="hide" select="0"/>
<xsl:param name="arity" select="0"/>
<xsl:attribute name="{name()}">
<xsl:call-template name="set_attribute">
<xsl:with-param name="attr" select="."/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="hide" select="$hide"/>
<xsl:with-param name="arity" select="$arity"/>
<xsl:template name="set_attribute">
<xsl:param name="attr"/>
<xsl:param name="c-tag"/>
+ <xsl:param name="cook" select="'false'"/>
<xsl:param name="hide" select="0"/>
<xsl:param name="arity" select="0"/>
<xsl:param name="not" select="'false'"/>
<xsl:otherwise>@uri</xsl:otherwise>
</xsl:choose>
</xsl:variable>
-
+
<xsl:call-template name="op_attr">
<xsl:with-param name="attr_type" select="$attr_type"/>
<xsl:with-param name="not" select="$not"/>
+ <xsl:with-param name="cook" select="$cook"/>
<xsl:with-param name="c-tag" select="$c-tag"/>
<xsl:with-param name="const" select="$arity = 0 and $hide = 0"/>
</xsl:call-template>