[xquery-talk] Dynamic context default values

Frans Englich frans.englich at telia.com
Wed Feb 7 14:33:24 PST 2007

On Wednesday 07 February 2007 12:41, Michael Kay wrote:
> > I neither see that implementations must be able to set the
> > collection to certain nodes, so the XQTS is a bit
> > over-demanding here, in my opinion.
> >
> > However, this is actually the first time I've seen an
> > implementor consider this a problem.
> I remember a similar question came up early in the life of XSLT 1.0: would
> an implementation be conformant if every URL passed to the document()
> function returned a "document not found" error? The answer is that it
> would; and in some circumstances such a processor might even be marketable,
> e.g. if designed to run in a high security environment.
> But I don't think this means that such tests should be absent from the test
> suite. What it means is that they should be labelled so that if necessary
> you can avoid running them and explain why you didn't run them. If your
> product doesn't have a feature then you presumably have a good reason for
> excluding it and are not frightened of explaining in public why it is
> absent.

My idea was to move the tests that require implementations to map collection 
URIs to documents, to an optional section. In that way they would still be in 
the test suite but people could decide not to implement the mapping. It seems 
to be a reasonable thing to do considering what the spec require and does 

But, I must say I would prefer if people implemented it instead!

> I initially thought that the collection() function wasn't going to be
> useful outside a database context. In fact, Saxon users have found it a
> very valuable feature, given the ability to map a URI to a selection of
> files from a hierarchic filestore.

Yes, it's a nice delegation mechanism that probably will save XQuery from many 
proprietary extensions. It's simple too.



More information about the talk mailing list