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

RE: Getting an error with a variable

Subject: RE: Getting an error with a variable
From: "Garry Searle" <garry@xxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Jul 2006 14:31:07 +0930
garry searle
Thanks for your help, worked great.

I have another question.

I'm wanting to combine 2 xml files. One has a list of car number and
competitor names, the other is a list of times. Essentially a relational
database. I use .asp to pass the xml and xsl files. Is it possible to pass 2
xml files, or how can I access the data from the 2nd xml file. Could you
point me to some documentation. I havent been able to find anything.


-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Friday, 28 July 2006 8:23 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Getting an error with a variable

variable bindings are in scope just for the element that contains your
binding, so in your case it is only in scope within the xsl:for-each.
So it's already gone out of scope outside the xsl:when clause.

Also it is a lot more efficient to use the form

<xsl:variable name="sNum" select="@no"/>

as that binds sNum to the attribute whereas

	      <xsl:variable name="sNum">
	        <xsl:value-of select="@no"/>
makes a new root node with child a text node with string value the
string value of the attribute.

I think you want the h2 element to contain the @no attribute if
and $paramVal2 otherwise, in which case no variables are needed:

<xsl:value-of select="$paramVal2[not(0=$paramVal4)]
@no" />


Current Thread


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.
First Name
Last Name
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.