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] Entities references vs. XRef as a way to manage changing glossary


On Thu, Aug 07, 2003 at 08:23:04AM -0400, Taro Ikai wrote:
> > I'm not sure I understand.  An inline glossterm with
> > @linkend *will* form a hot link.  You can turn off
> > the hot link by setting the stylesheet parameter
> > firstterm.only.link to nonzero.  Then only <firstterm>
> > elements with @linkend will be hot links.
> 
> Thanks Bob.
> 
> The external glossary document I made quickly is not a
> complete, valid DocBook glossary document. That's probably
> why the hot link was not craeted in my experiment. 
> I will make it a valid glossary document, and make use of
> the firstterm.only.link parameter.
> 
> > But more importantly, an empty inline glossterm
> > will not generate text.  The output will be
> > empty when processed with the XSL stylesheets.
> > Does that matter?  Are you going to customize
> > the behavior of the inline glossterm template to work
> > like an inactive xref?
> 
> Sorry for the confusion. I improperly abbreviated my 
> statement by making the glossterm element empty. 
> In fact, what I have is:
> 
>   <glossterm linkend='peach_pie'>Peach Pie</glossterm>
> 
> That said, I AM tempted to customize the template a little
> bit to be able to say:
> 
>   <glossterm linkend='peach_pie'/>
> 
> mainly for the terseness of the expression, but also 
> because I think the former make ambiguous what will
> get into the output, especially to someone not familiar
> with DocBook.
> 
> Do you see any pitfalls in doing this?

Referencing a glossentry is different from an xref to
a section.  Generated text for an xref comes from the
title or number information for the target.  A glossentry
doesn't have either.

But take a look at how an @endterm attribute is handled
in the xref template.  That feature resolves the content
of the element being referenced by endterm.  You want to
do what xref does with endterm, but without generating
a link.

For example, here is how one could generate an xref
to a glossentry whose generated text is the glossterm:

<xref linkend="gl-xslfoprocessor" endterm="gt-xslfoprocessor"/>
...

<glossentry id="gl-xslfoprocessor">
<glossterm id="gt-xslfoprocessor">XSL-FO processor</glossterm>
<glossdef>
<para>Software component that converts an XSL-FO document into a
formatted document.</para>
</glossdef>
</glossentry>

The linkend in the <xref> points to the glossentry,
but the endterm attribute causes the generated text to
be the children of the element whose id is referenced in
the endterm, which is the glossterm.  This <xref> should
generate a link whose hot text is "XSL-FO processor".

-- 

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

---------------------------------------------------------------------
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]