-<!-- Generates an url from an uri -->
-<!-- DUPLICATO in content_to_html!! -->
-
-<xsl:template name="makeURL">
- <xsl:param name="uri" select="''"/>
- <xsl:value-of select="concat(string($header),string($uri),'&param.CICURI=',string($uri))"/>
+<xsl:template match="ht:THEOREM">
+<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:copy-of select="document(string($url))"/>
+ <xsl:value-of select="$url"/>
+ </xsl:copy>