[Bug 4595] 1.0.3dev: document(*) with undefined context item

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4595





------- Comment #3 from mike@saxonica.com  2007-06-05 09:18 -------
Well, the spec does say that you can detect dynamic errors during the static
phase; but these particular errors can only be detected if you know at compile
time that there will be no context item, and I don't quite see where you get
that knowledge from. I don't think it's non-conformant to use such extra
knowledge at compile time if it's available, but I don't think you should
expect the test suite to take account of this possibility. After all, returning
a different error code isn't considered to be a test failure.

I think the vast majority of the tests in the test suite that demonstrate
static errors also supply no input document. If it's legitimate to return
XPDY0002 for the cases you identify, then it's probably legitimate to return it
for every one of these tests, which makes a nonsense of the exercise.

Perhaps there's a slightly different point here. We do have in the static
context a field "Context item static type", and I suppose if the type of the
context item is known in advance, then it might also be known in advance that
there will be no context item, which I suppose would be represented by a static
type such as "none", or by this field being null/absent. But then I would
expect to see a type error of some kind, rather than a dynamic error.

Received on Tuesday, 5 June 2007 09:18:29 UTC