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


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