</xsl:template>
<!-- _top to refresh the whole frameset (avoids the matrioska effect ;-) -->
-<xsl:template match="a[@href]">
+<!-- a[@href] doesn't match with every anchor elements!!! -->
+<xsl:template match="*[@href]">
<xsl:copy>
<xsl:copy-of select="@*"/>
- <xsl:attribute name="href">
- <xsl:call-template name="makeURL">
- <xsl:with-param name="uri" select="@href"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="target">cic</xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="starts-with(@href,"cic")">
+ <xsl:attribute name="href">
+ <xsl:call-template name="makeURL">
+ <xsl:with-param name="uri" select="@href"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="target">cic</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">
+ <xsl:call-template name="makeTheoryURL">
+ <xsl:with-param name="uri" select="@href"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="target">theory</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
+