LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Problem with generated anchor
From: John Delacour <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Wed, 29 Dec 1999 00:50:55 +0000
Content-Type:multipart/mixed
Parts/Attachments:
Parts/Attachments

text/plain (53 lines) , %NOANCHOR.ZIP (123 bytes) , NOANCHOR.ZIP (1956 bytes)


[Sent on behalf of Isabel Delacour -- hope someone can help]

I am trying to create both a link and an anchor to match the link,
using xsl on the same xml node, but cannot get it to work.

I am trying to automatically create a glossary from
these sets of tags in my xml document:

<definition><term></term><meaning></meaning></definition>

I use this xsl syntax to create the link in the main
part of the displayed document:

<xsl:template match="definition">
        <a>
                <xsl:attribute name="href">
                        #<xsl:apply-templates select="./term" />
                </xsl:attribute>
                <xsl:apply-templates select="./term" />
        </a>
</xsl:template>

(the term template simply contains: <xsl:value-of />


Then to create the anchor in the glossary section, I
use:

<xsl:for-each select="//definition" order-by="+term">
        <a>
                <xsl:attribute name="name">
                        <xsl:apply-templates select="./term" />
                </xsl:attribute>
        </a>
        <b><xsl:apply-templates select="./term" /></b>
        <xsl:apply-templates select="./meaning" />
</xsl:for-each>

But the anchor does not seem to work when I use an xsl
element as the attribute value, yet it works if I just
put plain text as the attribute value (but this means
that the links won't go anywhere).


I have attached two short files: an xml document, and
it's associated stylesheet, which explain in more
detail the problem I am having.  (I am using IE5 as my
browser).

ID



Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager