OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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
bobs@sagehill.net


----- Original Message ----- 
From: "Robert Nagle" <idiotprogrammer@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
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: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]