[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Reusing XML content as I publish

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

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:
<glossary>
<alphagroup>
<alphahead>A</alphahead>
<glossaryitem name="Allocate">
<term>Allocate Stuff</term>
<definition>
<para>Stuff about allocations</para>
</definition>
</glossaryitem>
</alphagroup>
<alphagroup>
<alphahead>C</alphahead>
<glossaryitem name="Commitments">
<term>Commitments</term>
<definition>
<para>Text about commitments</para>
</definition>
</glossaryitem>

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
allocations</span></a>
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.
Thanks,

Nicola

Nicola Harlow | Technical Author
The Program Management Group
www.pm-group.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.