This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Entities references vs. XRef as a way to manage changingglossary
- From: Taro Ikai <tikai at ABINITIO dot COM>
- To: Bob Stayton <bobs at sco dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 4 Aug 2003 19:03:37 -0400
- Subject: Re: [docbook-apps] Entities references vs. XRef as a way to manage changingglossary
> Another approach is to let a customized stylesheet resolve
> the references. For example, you could enter a nice clean:
>
> <glossterm role="lookup">dessert</glossterm>
>
> and the custom stylesheet file would handle the insertion of
> the text. You would pass the pathname of the glossary.xml
> file to the XSLT processor as a stylesheet parameter,
> the stylesheet would use document() to load its content into
> a variable. Then the template that matches on
> match="glossterm[@role = 'lookup']" would look up the
> text value in the variable with something like:
>
> <xsl:variable name="key" select="text()"/>
> <xsl:variable name="glossary" select="document($glossdoc, /)"/>
> <xsl:value-of select="$glossary//varname[@id=$key]/*"/>
>
This worked exactly as you described it. Thanks again.
Taro
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org