Re: Issue #3306


Regarding this issue:


I think it is worth noting that XSLT 1.0 already discusses the
possibility of node-sets spanning multiple documents:

XSLT 2.0 updates this as well, using sequences of course:

The document() function is allowed to take a node-set as first
argument, which basically identifies a bunch or URIs. The result of
the document() function in this case is a node-set which may contain
nodes from different documents (typically, one node per document, and
even more typically, each document's root node).

(With XSLT, order of nodes among documents is implementation-dependent
but has to be "consistent".)

It is possible to have a variable refer to that node-set, of course:

   <xsl:variable name="my-nodes" select="document(//my-uris)"/>

Now again my point doesn't regard the document() function, which we
don't have in XPath, but the fact that the notion of having node-sets
containing nodes from multiple documents is not new, and that we can
be consistent with what is being done in XSLT 1.0.

In XProc, we wouldn't have something really different if we had
$documents refers to a "sequence" of documents. Make $documents a
node-set containing the root nodes of the documents in the order in
which they "arrive". Jeni can then write her:

      <p:input name="input" select="$documents" />
      <p:when test="count($input) >= 1">

This sounds like a simple and compelling solution to me.


Orbeon - XForms Everywhere:

Received on Friday, 2 June 2006 15:32:21 UTC