[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Query re variable use
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|