|
Subject: Re: [xsl] Reusing XML content as I publish From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Fri, 28 Jan 2005 17:19:53 +0100 |
Note that, in html, the 'class' attribute is interpreted as a space separated list.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: 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>
<xsl:template match="/"> <html> <body> <xsl:apply-templates/> </body> </html> </xsl:template>
<xsl:template match="alphahead"> <h1> <xsl:value-of select="."/> </h1> </xsl:template>
<xsl:template match="glossaryitem">
<a href="#" class="tooltip {@name}">
<xsl:value-of select="term"/>
<span>
<xsl:apply-templates select="definition"/>
</span>
</a>
</xsl:template>regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) Deserta faciunt et innovationem appelant
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Reusing XML content as I publ, Nicola Harlow | Thread | RE: [xsl] Reusing XML content as I , Nicola Harlow |
| Re: [xsl] Testing Transformation Fi, Robert Koberg | Date | RE: [xsl] Relative XPATH between 2 , Michael Kay |
| Month |