|
Subject: Re: Query re variable use From: "Michael Beddow" <gll6mb@xxxxxxxxxxxxxxxxxx> Date: Mon, 26 Jun 2000 23:08:00 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: Query re variable use, Linda van den Brink | Thread | RE: xsl self-documentation - ideas, Pawson, David |
| xt:document equivalent in other XSL, Brian Young | Date | Re: xt:document equivalent in other, Steve Muench |
| Month |