This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 2.3.2.5" as there is no section 2.3.2.5, 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.

joachim


--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]