Next in thread → Next in month →

Re: [docbook-apps] suppressing hyperlink for xrefs in HTML output?

From
Bob Stayton <>
Date
2009-12-11T18:11:39+00:00
ID
0be001ca7a8d$53cb24c0$0b00a8c0@pazu
Thread
Re: [docbook-apps] suppressing hyperlink for xrefs in HTML output?
Hi,
You could add a role attribute to such xref elements, such as role="nolink", 
and then add this template to your customization layer:

<xsl:template match="xref[@role='nolink']">
  <xsl:variable name="content">
    <xsl:apply-imports/>
  </xsl:variable>
  <xsl:value-of select="$content"/>
</xsl:template>

It does the normal processing of the xref into a variable, and then when you 
apply xsl:value-of, you get just the text content of the result.

Bob Stayton
Sagehill Enterprises



----- Original Message ----- 
From: "Robert Nagle" <>
To: <>
Sent: Friday, December 11, 2009 9:34 AM
Subject: [docbook-apps] suppressing hyperlink for xrefs in HTML output?


> I'm making a docbook projects for ebook and print output.
>
> Sometimes throughout the text I need to refer to a table or chapter:
>
> "As Table 4 indicates,"
>
> Usually I will mention this in the paragraph immediately before or
> after where  the table actually appears in the chapter.  In such a
> case, there would be no need to include a link to it, only the label
> with the appropriate value.
>
> In the print output this will look fine, but in HTML output the "Table
> 4" will be a hyperlink to the table in question. In some cases, that
> is good (i.e., if I'm referencing Table 4 in Chapter 11) but in cases
> where Table 4 is very close to the xref, all I need is the label (and
> not the hyperlink).
>
> In cases where the referenced table or figure or section is already
> very close to the object (making a link redundant), do I have some
> control over whether I can suppress the hyperlink in HTML output for
> certain xrefs?
>
> What would I need to do to get this done?
>
>
> -- 
> Robert Nagle
> htpt://www.robertnagle.info
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
>
>
>
Next in thread → Next in month →