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

Newbie questions on "current" vs "context" and "node-set" ve

Subject: Newbie questions on "current" vs "context" and "node-set" versus "node-list"
From: "Larry Fitzpatrick" <lef@xxxxxxxxxxxx>
Date: Thu, 20 May 1999 18:55:44 -0400
current node context node
Hi, I have a handful of newbie questions.

In reading the spec, I find I have had trouble keeping track of the meanings of
context node (and context node list) and current node (and current node list),
where each is relevant, and how they relate to each other. I'd like to describe
what I "think" I understand and hope that where I am wrong someone will
educate me. 

Is it fair to say that:

- The current node (and list) are maintained for use by the
"processing model" and that the context node( and list) are used during
expression (and pattern) evaluation? 

- That when an expression needs to be evaluated, while processing source nodes,
a context node (and list) are created from the current node (and list)?

- That at certain appointed times during expression evaluation a new context node
(and list) may be created depending on the subexpression that needs to be evaluated?

- There are differences between the context node list that gets used for certain

- There are differences between the context node list that gets used for patterns
and expressions for the same type of subexpression (e.g., Predicates).

Somewhat related, I have also had some trouble with the difference between
node-sets and node-lists. In short, I cannot seem to find any point to node-sets.

Many expression evaluations return "node-sets" (order is immaterial)
and then convert those into "node lists" (order is material). In many 
places, the ordering is stated to be "document order" but in a few places the ordering is
not stated. For example,

    "The element is called xsl:value-of because a node-set is converted to a string by returning the value
    of the first node."

The "first node" implies an order exists, but a node-set has no order.  And also

    "The xsl:copy-of element copies a list of nodes specified by an expression. "

An expression returns a node-set, which is unordered. So,  I find myself wondering
why "node-set" exists at all? I haven't stumbled into any places where the first thing you do with
a node-set is something OTHER than order it. Why don't expressions (that return 
node-sets) just return lists with a well-specified order and the notion of a node-set
goes away?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

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.