Closed tomschr closed 4 years ago
After your comment, I've played around a bit. I think, I've found now an even better solution.
The basic idea is almost the same for FO and HTML: you stuff everything (including any FO or HTML nodes) into the variable rtf
. With exsl:node-set()
you create a node set from your result tree fragment (rtf). As the link are the first element in the node, you skip this link node and copy everything underneath to your end format.
For FO it looks like this (same for HTML, but with span
instead of <fo:inline>
):
<xsl:when test="$xref.in.samebook = 0 and @xrefstyle">
<xsl:variable name="rtf">
<xsl:apply-imports/>
</xsl:variable>
<xsl:variable name="node" select="exsl:node-set($rtf)/*"/>
<fo:inline xsl:use-attribute-sets="xref.basic.properties">
<xsl:copy-of select="$node/node()"/>
</fo:inline>
</xsl:when>
I've tested it and it works quite well: the text is not clickable anymore and it preserves the formatting whatever is in its title.
Thanks!
This PR fixes #398 and contains:
Withrole="no-intra"
, intra-xrefs can be disabled.xrefstyle
attributeCo-authored-by: Stefan Knorr