Re: Issue #3306

> 0. Say that queries over document sequences aren't supported in XProc

If we did this, then there is a simple workaround which is to have a
standard component that takes a sequence of documents and returns a
single document containing them as children of the root element.  You
can then do a query on that.

Of course this is potentially inefficient, but I doubt that it's a
very common case, and it doesn't preclude a solution such as:

> 4. Move to XPath 2.0, which supports sequences

in a later version of the spec.

> 3. Define an XPath 1.x that supports sequences, and use that in XProc
> 
> Option 3 is the worst of these options, in my opinion, since it involves 
> a lot of effort on our part and would be foreign to any users. 

I agree this is a bad choice.

> 1. Say that XProc inputs and outputs are actually *sets* of documents

Document sequences are going to be very common, as I said above I
think that queries on document sequences are much rarer.  We shouldn't
let the sequence-query tail wag the sequence dog.

We could say that sequences decay into sets when used for pipeline
queries.

> 2. Say that XProc inputs and outputs are sequences with no duplicates, 
> and, when translated into XPath datatypes, that the document order of 
> the root nodes is determined by their order in the sequence

This is an interesting possibility, but the ease of implementing it
might vary widely.

> Do people have examples of components that produce sequences of 
> documents where (a) the order of the documents within that sequence 
> matters and/or (b) the sequence can contain duplicate documents?

Can you construct duplicate documents at all in the pipeline?  I think
we had agreed some time ago that the pipeline itself has copying
semantics: if a component modifies an input document (assuming the
implementation provides a way to do that) it doesn't affect other
components that have the same document as input.  It would be
consistent to say that no standard components generate sequences with
the same ("eq") document twice.  I suppose a user-written component
under a given implementation might be able to generate a sequence with
duplicate documents

-- Richard

Received on Monday, 5 June 2006 10:44:51 UTC