]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/expandobj.xsl
...
[helm.git] / helm / style / expandobj.xsl
index 5a7b74ea2ff1935e7170668b8038cf71d020859a..ee53cf2de0cb28876dd6f4f0e726abf66c30fea3 100644 (file)
 <!-- document cannot return HTML, transforming it into XML!!! -->
 
 <xsl:template match="ht:THEOREM">
-<xsl:variable name="url"><xsl:call-template name="makeURL4embedding"><xsl:with-param name="type" select="1"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
+<xsl:variable name="url"><xsl:call-template name="makeURL4embedding"><xsl:with-param name="type" select="'typeonly'"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
    <xsl:copy>
     <xsl:copy-of select="@*"/>
-<!--<xsl:variable name="doc" select="document(string($url))"/>
-<xsl:value-of select="$doc"/>-->
     <xsl:copy-of select="document(string($url))"/>
+    <xsl:value-of select="$url"/>
    </xsl:copy>
 </xsl:template>
 
 <xsl:template match="ht:AXIOM|ht:DEFINITION|ht:VARIABLE">
-<xsl:param name="type" select="0"/><xsl:variable name="url"><xsl:call-template name="makeURL4embedding"><xsl:with-param name="type" select="0"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
+<xsl:variable name="url"><xsl:call-template name="makeURL4embedding"><xsl:with-param name="type" select="'embed'"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
    <xsl:copy>
     <xsl:copy-of select="@*"/>
     <xsl:copy-of select="document(string($url))"/>
@@ -70,7 +69,8 @@
 
 <xsl:template match="ENTITY">
 <xsl:variable name="url"><xsl:call-template name="makeURL4embedding"><xsl:with-param name="type" select="@type"/><xsl:with-param name="uri" select="@uri"/></xsl:call-template></xsl:variable>
-  <xsl:copy-of select="document(string($url))"/>
+  <xsl:variable name="doc_to_embed" select="document(string($url))/to_be_embedded"/>
+  <xsl:copy-of select="$doc_to_embed/*|$doc_to_embed/text()"/>
 </xsl:template>
 
 <!-- CONTENT AND PRESENTATION THEORY AND SUBTHEORY -->
@@ -82,4 +82,4 @@
   </xsl:copy>
 </xsl:template>
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>