[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using variables correctly
<xsl:for-each select="database/computer[$search = $searchparam]">" a variable holds a value not an unexecuted expression so whether the variables search and searchparam hold the same value or not does not depend on the current node. database/computer[$search = $searchparam] is the same as database/computer or the same as /.. depending on whether or not tehse are equal. $search is "@owner" so your expression is equivalent to database/computer["@owner" = $searchparam] and you will get the whole node set if searchparam is also the string "@owner" and nothing otherwise. I suspect you want database/computer[@*[name()=$search] = $searchparam] David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.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
|