Skip to content

Commit d016b28

Browse files
author
Sanders Kleinfeld
committed
Bug fix around processing of absolute Web hrefs in non-XREF <a>s.
1 parent a2ea7ea commit d016b28

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

htmlbook-xsl/chunk.xsl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ sect5:s
408408
not(@data-type='link')">
409409
<xsl:call-template name="process-as-xref"/>
410410
</xsl:when>
411-
<!-- Otherwise just process href and apply-templates for everything else -->
412-
<xsl:otherwise>
411+
<!-- If href is an xref then process href -->
412+
<xsl:when test="$is-xref = 1">
413413
<xsl:copy>
414414
<xsl:apply-templates select="@*[not(name(.) = 'href')]"/>
415415
<xsl:attribute name="href">
@@ -439,6 +439,12 @@ sect5:s
439439
</xsl:attribute>
440440
<xsl:apply-templates/>
441441
</xsl:copy>
442+
</xsl:when>
443+
<!-- Otherwise, no special processing -->
444+
<xsl:otherwise>
445+
<xsl:copy>
446+
<xsl:apply-templates select="@*|node()"/>
447+
</xsl:copy>
442448
</xsl:otherwise>
443449
</xsl:choose>
444450
</xsl:template>

0 commit comments

Comments
 (0)