From: <bob...@us...> - 2014-10-16 01:01:44
|
Revision: 9947 http://sourceforge.net/p/docbook/code/9947 Author: bobstayton Date: 2014-10-16 01:01:39 +0000 (Thu, 16 Oct 2014) Log Message: ----------- If a link or xref has an @id or @xml:id, then add a span to include the id because simple.xlink no longer generates the id attribute. Modified Paths: -------------- trunk/xsl/html/xref.xsl Modified: trunk/xsl/html/xref.xsl =================================================================== --- trunk/xsl/html/xref.xsl 2014-10-15 21:54:42 UTC (rev 9946) +++ trunk/xsl/html/xref.xsl 2014-10-16 01:01:39 UTC (rev 9947) @@ -122,10 +122,23 @@ </xsl:choose> </xsl:variable> - <xsl:call-template name="simple.xlink"> - <xsl:with-param name="content" select="$content"/> - </xsl:call-template> + <xsl:variable name="id" select="(@id | @xml:id)[1]"/> + <xsl:choose> + <xsl:when test="$id"> + <span id="{$id}"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </span> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> <!-- ==================================================================== --> @@ -999,14 +1012,31 @@ </xsl:choose> </xsl:variable> - <xsl:call-template name="simple.xlink"> - <xsl:with-param name="node" select="."/> - <xsl:with-param name="linkend" select="$linkend"/> - <xsl:with-param name="content" select="$content"/> - <xsl:with-param name="a.target" select="$a.target"/> - <xsl:with-param name="xhref" select="$xhref"/> - </xsl:call-template> + <xsl:variable name="id" select="(@id | @xml:id)[1]"/> + <xsl:choose> + <xsl:when test="$id"> + <span id="{$id}"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="linkend" select="$linkend"/> + <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="a.target" select="$a.target"/> + <xsl:with-param name="xhref" select="$xhref"/> + </xsl:call-template> + </span> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="linkend" select="$linkend"/> + <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="a.target" select="$a.target"/> + <xsl:with-param name="xhref" select="$xhref"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> <xsl:template match="ulink" name="ulink"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |