- <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:when test="starts-with(@href,"theory:")">
+ <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:when>
+ <xsl:when test="starts-with(@href,"#")">
+ <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
+ <xsl:if test="@target">
+ <xsl:attribute name="target"><xsl:value-of select="@target"/></xsl:attribute>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>