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: =?iso-8859-15?Q?Re:_[docbook-apps]_How_to_suppress_"the_section_called?==?iso-8859-15?Q?"_in_crossrefs=3F?=


Hi Paul,

> Suppose that I have input like this:
> 
> For more information, see <xref linkend="some-id"/>.
> 
> For HTML, the output looks like this:
> 
> For more information, see the section called "My Section Title Here".
> 
> 
> Is there a parameter that I can use to suppress the "the section called"
> part?

There are two options:

1. Use xrefstyle to customize your cross reference
This is useful, if you want to customize xrefs individually. However, you have to use
the attribute xrefstyle on *every* xref.

See http://www.sagehill.net/docbookxsl/CustomXrefs.html#Xrefstyle

For example: <xref linkend="some-id"  xrefstyle="select: title"/>
(See Table 14.1: Keywords for xrefstyle select: for more keywords)


2. Add a customization layer for localization
This needs a bit more effort as you have to use a XSLT customization layer that
contains your corrections.

See http://www.sagehill.net/docbookxsl/CustomXrefs.html#XrefGentext


> [...]
> In fact, if I can suppress the surrounding quotes, I'd like to do that,
> too.  I just want the text of the cross-referenced section's title,
> nothing else.  Possible?

Use method 2 in your XSLT customization layer and add:

<xsl:param name="local.l10n.xml" select="document('')"/> 
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";> 
  <l:l10n language="en"> 
     <l:context name="xref">
       <!-- ... -->
       <l:template name="sect1" text="%t"/>
     </l:context>
  </l:l10n>
</l:i18n>

The original file is located at /path/to/docbook-xsl-stylesheets/common/en.xml. 

Hope that helps. :)

Tom


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