[xsl] Reusing XML content as I publish

Subject: [xsl] Reusing XML content as I publish
From: "Nicola Harlow" <Nicola.Harlow@xxxxxxxxxxxx>
Date: Fri, 28 Jan 2005 14:04:46 -0000

I need help with an XML problem.
I'm new to XML and not very technical, so please be very clear in your
responses ;)
Ok, I want to reuse text that I input into the XML. the output of this
is HTML.
I have a glossary section with glossary terms in it:
<glossaryitem name="Allocate">
<term>Allocate Stuff</term>
<para>Stuff about allocations</para>
<glossaryitem name="Commitments">
<para>Text about commitments</para>

Basically I want to reuse that text by getting the XML to search for the
<glossaryitem>, matching the name, and then using the <term> and
<definition> to create a 'tooltip':
<a href="#" class="tooltip_Allocate">Allocate Stuff<span>Stuff about
However, I can't work out how to identify <glossaryitem> and then get
the matching <definition> text into the <span>.
I DON'T want to do this on the fly; I want the tooltip created as I
create the HTML ;)
The tag I want to use (it would then align with my PDF output) is:
<glossarytt name="Allocate" width="200">Allocate Stuff</glossarytt>

The other alternative is to input each tooltip separately (waste of
time, no consistency etc), or to define each tooltip in the XSL
separately, then call the tooltip by name (very code-verbose, there
could be 100 separate glossary terms)
Does any one have any suggestions? If it's a case of 'give up' I'd
rather know now than carry on getting frustrated.
If you have a code sample it would be gratefully received, I'm quite
good at hacking the code to fit ;)
And let me apologise in advance for any terminology errors.


Nicola Harlow | Technical Author
The Program Management Group

Current Thread