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


On Mon, May 19, 2003 at 11:48:12AM +0200, Joachim Ziegler wrote:
> I have my <sect3>s and sections below unnumbered, by customizing the 
> stylesheets:
> 
>      <l:context name="title-numbered">
>        <l:template name="sect3" text="%t"/>
>        <l:template name="sect4" text="%t"/>
>        <l:template name="sect5" text="%t"/>
>      </l:context>
> 
> 
> Now when I make an xref to a sect3, I want to generate the number of the 
> *parent* sect2 of this sect3 (because the sect3 has no number). (The 
> stylesheets generate the complete number of the sect3).
> 
> How do I do this?

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)

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.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


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