[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Query re variable use

Subject: Re: Query re variable use
From: "Michael Beddow" <gll6mb@xxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Jun 2000 23:08:00 +0100
query to variable
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.