[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What do we have in variable?
Roma Yankin wrote: > I'm just trying to understand, whenever we initialize some variable for > example in that way <xsl:variable name="somevar" select="ancestor::*"/> > what do we have stored inside it? Is it an array or some root node? In this case, an unordered collection of nodes (most likely, all the element nodes that are ancestors of the current node): a "node-set". The XPath spec explains that there are 4 basic types of objects: boolean, number, string, node-set. XSLT 1.0 adds one more: result tree fragment. (a special type of node-set). When you create a variable, you are naming an object, and possibly creating the object at the same time, if it didn't already exist. The variable isn't really a container, it is a binding of a name to an object, and the object is one of those 5 types listed above. The binding of the name to the object is permanent (you can't modify the object or the name), but its scope is limited to only certain places in the stylesheet. - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/ 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
|