|
10 | 10 |
|
11 | 11 | <!-- Chunk template used to split content among multiple .html files -->
|
12 | 12 |
|
13 |
| - <!-- ToDo: For XREF hyperlinks to ids that are in the same chunk, no need to prepend filename to anchor (although it probably doesn't hurt) --> |
14 | 13 | <!-- ToDo: Add "previous" and "next" links as in the docbook-xsl stylesheets? -->
|
15 | 14 |
|
16 | 15 | <!-- Imports htmlbook.xsl -->
|
@@ -323,18 +322,12 @@ sect5:s
|
323 | 322 | <!-- All XREFs must be tagged with a @data-type containing XREF -->
|
324 | 323 | <xsl:template match="h:a[contains(@data-type, 'xref')]">
|
325 | 324 | <xsl:param name="autogenerate-xrefs" select="$autogenerate-xrefs"/>
|
326 |
| - <xsl:variable name="href-anchor"> |
327 |
| - <xsl:choose> |
328 |
| - <!-- If href contains an # (as it should), we're going to assume the subsequent text is the referent id --> |
329 |
| - <xsl:when test="contains(@href, '#')"> |
330 |
| - <xsl:value-of select="substring-after(@href, '#')"/> |
331 |
| - </xsl:when> |
332 |
| - <!-- Otherwise, we'll just assume the entire href is the referent id --> |
333 |
| - <xsl:otherwise> |
334 |
| - <xsl:value-of select="@href"/> |
335 |
| - </xsl:otherwise> |
336 |
| - </xsl:choose> |
| 325 | + <xsl:variable name="calculated-output-href"> |
| 326 | + <xsl:call-template name="calculate-output-href"> |
| 327 | + <xsl:with-param name="source-href-value" select="@href"/> |
| 328 | + </xsl:call-template> |
337 | 329 | </xsl:variable>
|
| 330 | + <xsl:variable name="href-anchor" select="substring-after($calculated-output-href, '#')"/> |
338 | 331 | <xsl:variable name="is-xref">
|
339 | 332 | <xsl:call-template name="href-is-xref">
|
340 | 333 | <xsl:with-param name="href-value" select="@href"/>
|
|
0 commit comments