[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] XSLT Streaming Terminology: Roaming

Subject: [xsl] XSLT Streaming Terminology: Roaming
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Sat, 15 Feb 2014 10:33:42 +0000

Hi Folks,

The XSLT 3.0 specification defines roaming like so:

	Roaming: indicates that the nodes returned
	by an expression could be anywhere in the
	tree. For example, expressions using the axis
	steps following or preceding will typically be

Suppose I create a function. I pass to it the context node and it returns some

<xsl:function name="f:get-nodes" as="element()*">
    <xsl:param name="context-node" />

The function is a black box; the nodes that it returns could be from anywhere
in the XML document. So this expression:


is roaming.

Next, suppose the XSLT processor is positioned at the first <title> element:


This expression:


returns all <section> elements that follow the <title> element.

Apparently that expression is roaming. But I don't see why.

Roaming means that the expression could returns nodes from "anywhere in the
tree." Clearly this expression:


is not returning nodes from "anywhere in the tree." Rather, it is returning
nodes from a well-defined location in the tree.

I understand how f:get-nodes(.) could return nodes from anywhere in the tree,
but I don't see how following::section could return nodes from anywhere in the
tree. Would you shed light on this please?


Current Thread