This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Query re variable use
- To: <xsl-list at mulberrytech dot com>
- Subject: Re: Query re variable use
- From: "Michael Beddow" <gll6mb at smlc01 dot leeds dot ac dot uk>
- Date: Mon, 26 Jun 2000 23:08:00 +0100
- References: <200006261541.LAA15478@mulberrytech.com>
- Reply-To: xsl-list at mulberrytech dot com
Earlier I asked for help transforming
<person index="N12345">Joe Bloggs</person>
into
<a href = "names.xml?key='N12345'">Joe Bloggs</a>
Many thanks to all those who pointed me towards AVTs, viz:
<a href="namelist.xml?key={$myindex}"><xsl:value-of
select="."/></a>
But before those replies came in, I'd realised I could get the
outputI wanted by using
<a><xsl:attribute name="href">namelist.xml?key=<xsl:value-of
select = "$myindex"/></xsl:attribute><xsl:value-of
select="."/></a>
I'd be interested in any views about the relative merits of
those two solutions, especially in terms of efficiency.
BTW David, I take your point that I don't need the variable, but
my real code is more complicated than the cut-down version I
used in the posting, and there the variable has a job to do. But
I should have trimmed that out, too: sorry.
Michael
-------
Michael Beddow
University of Leeds UK
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list