[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Reusing XML content as I publish
Nicola,
We use keys for this kind of thing. One can do it using brute force XPath, but this is often not pretty (either as code, or in performance). In this case, glossary items could be retrieved by name using <xsl:key match="glossaryitem" use="@name" name="glossaryitems-by-name"/> So I would write: 'You can then <glossarytt name="Allocate" width="200">Allocate</glossarytt> resources' Given this source, <xsl:template match="glossarytt"> <xsl:apply-templates select="key('glossaryitems-by-name',@name)" mode="tooltip"/> </xsl:template> ... the key() function in the select expression retrieves the glossaryitem node that belongs to the matched glossarytt. You could then have a template matching the glossaryitem in mode "tooltip" to generate your tool tip. Cheers, Wendell At 11:37 AM 1/28/2005, you wrote: What I want to do is pick up the text from one of the terms and reuse it elsewhere in the document by referencing just the glossary item "name", and getting the term and definition as part of a 'tooltip.' ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|