Date: Fri, 5 Jul 2013 19:19:13 +0000 (UTC) From: Rene Ladan <rene@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-projects@freebsd.org Subject: svn commit: r42165 - in projects/entities/share: xml xsl Message-ID: <201307051919.r65JJDmA046421@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307051919.r65JJDmA046421>