• Added target attribute to hyperlinks for (X)HTML only.
1 parent d3bd61e commit b6d456eb1dd4015ef6836e00bd8c64b9a1ef4310
Nigel Stanger authored on 6 Jul 2014
Showing 1 changed file
View
50
modules/hyperlinks.xml
@label: A label that the hyperlink links to. The value should be an acceptable label in both LaTeX and HTML. [optional]
@url: A URL that the hyperlink links to. If no link text is provided, the URL is used as the link text. [optional]
@target: The target tab/window to open the hyperlink in. Only applies to (X)HTML. [optional]
Only one of @label and @url may be specified.
-->
 
</xsl:if>
</xsl:for-each>
</common>
<common formats="/html/xhtml/">
<a href="#{@label}"><xsl:apply-templates /></a>
<a href="#{@label}">
<xsl:if test="@target">
<xsl:attribute name="target">
<xsl:value-of select="@target" />
</xsl:attribute>
</xsl:if>
<xsl:apply-templates />
</a>
</common>
</template>
</xsl:if>
</xsl:for-each>
</common>
<common formats="/html/xhtml/">
<a href="{@url}"><xsl:apply-templates /></a>
<a href="{@url}">
<xsl:if test="@target">
<xsl:attribute name="target">
<xsl:value-of select="@target" />
</xsl:attribute>
</xsl:if>
<xsl:apply-templates />
</a>
</common>
</template>
<xsl:value-of select="@url" />
<xsl:text>}</xsl:text>
</common>
<common formats="/html/xhtml/">
<a href="{@url}"><code><xsl:value-of select="@url" /></code></a>
<a href="{@url}">
<xsl:if test="@target">
<xsl:attribute name="target">
<xsl:value-of select="@target" />
</xsl:attribute>
</xsl:if>
<code><xsl:value-of select="@url" /></code>
</a>
</common>
</template>