svn commit: r42165 - in projects/entities/share: xml xsl
Rene Ladan
rene at FreeBSD.org
Fri Jul 5 19:19:14 UTC 2013
Author: rene
Date: Fri Jul 5 19:19:13 2013
New Revision: 42165
URL: http://svnweb.freebsd.org/changeset/doc/42165
Log:
Re-add support for the nolink attribute, in which case the email address
is rendered but without a clickable link.
Modified:
projects/entities/share/xml/xhtml.xsl
projects/entities/share/xsl/freebsd-xhtml-common.xsl
Modified: projects/entities/share/xml/xhtml.xsl
==============================================================================
--- projects/entities/share/xml/xhtml.xsl Fri Jul 5 19:18:25 2013 (r42164)
+++ projects/entities/share/xml/xhtml.xsl Fri Jul 5 19:19:13 2013 (r42165)
@@ -164,13 +164,20 @@
<xsl:template match="xhtml:email">
<xsl:text><</xsl:text>
- <a>
- <xsl:attribute name="href">
- <xsl:text>mailto:</xsl:text>
- <xsl:value-of select="." />
- </xsl:attribute>
- <xsl:apply-templates />
- </a>
+ <xsl:choose>
+ <xsl:when test="@role='nolink'">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>mailto:</xsl:text>
+ <xsl:value-of select="." />
+ </xsl:attribute>
+ <xsl:apply-templates />
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>></xsl:text>
</xsl:template>
Modified: projects/entities/share/xsl/freebsd-xhtml-common.xsl
==============================================================================
--- projects/entities/share/xsl/freebsd-xhtml-common.xsl Fri Jul 5 19:18:25 2013 (r42164)
+++ projects/entities/share/xsl/freebsd-xhtml-common.xsl Fri Jul 5 19:19:13 2013 (r42165)
@@ -166,13 +166,20 @@
<xsl:template match="xhtml:email">
<code class="email">
<xsl:text><</xsl:text>
- <a class="email">
- <xsl:attribute name="href">
- <xsl:text>mailto:</xsl:text>
- <xsl:value-of select="."/>
- </xsl:attribute>
- <xsl:value-of select="."/>
- </a>
+ <xsl:choose>
+ <xsl:when test="@role='nolink'">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:otherwise>
+ <a class="email">
+ <xsl:attribute name="href">
+ <xsl:text>mailto:</xsl:text>
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:apply-templates />
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>></xsl:text>
</code>
</xsl:template>
More information about the svn-doc-projects
mailing list