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] Customizing cross-references for unnumbered <sect3>s

Bob Stayton wrote:
> I'm not sure I understand.  You want the internal pointer
> (href for HTML and internal-destination in FO) to point
> to the sect3 id location, but you want the generated text to
> point to the sect2 number, as is "Section 2.3.2"?
> (assuming chapter number is the first digit)

Yes, because my <sect3>s are not numbered. So it would look funny to 
read "how we have seen in section" as there is no section, only a parent section 2.3.2.

Using only the name of the section is no good idea either, beause 4 
chapters later, the reader cannot remember what and where was "the 
section called 'Running Hello World'". (This is more a problem of the 
print version.)

This is common behaviour of LaTeX's \label and \ref-mechnanism: The 
\label can appear anywhere and the generated text for the \ref takes 
into account the depth of the numbering.

> That will be hard, because the gentext mechanism can't
> handle accessing a parent sect2 since it just uses
> attribute values, no XSL code.  You could try adding a
> custom template with mode="object.xref.markup" like the
> one for listitem in common/gentext.xsl:
> <xsl:template match="sect3|sect4|sect5 mode="object.xref.markup">
> A template like that can access its parent sect2 and apply
> templates in mode label.markup to get its label, then
> pass that label value as a parameter to the
> substitute-markup template.

Seems like I have to go into XSLT for that. :-)

What I want seems to be hard, at least for me. So a solution would be 
just not to reference any <sect3>s, onle the parent <sect2>s.


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