This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
3.2.1 Processing model Regarding the dynamic evaluation phase, It says "While implementations are free to implement different processing models, the [XPath/XQuery] static semantics relies on the existence of a static type analysis phase that precedes any access to the input data. Statically typed implementations are required to find and report type errors during static analysis, as specified in this document. Dynamically typed implementations are required to find and report type errors during evaluation, but are permitted to report them during static analysis." This paragraph gives the impression that, for a given [expression/query] EQ, the set of type errors that might be found for EQ using an implementation that supports the Static Typing Feature will be precisely the same set of type errors that would be found during dynamic execution if the implementation does not support the Static Typing Feature. However, XQuery has an example in which a note asserts that the example will fail under Static Typing Feature with a type error, but succeed in the dynamic phase if there is no Static Typing Feature. Specifically, the Static Typing Feature requires the discovery of all potential typing errors, for example, passing a value of type item()* to an argument of type item()+, whereas the dynamic evaluation phase will not look for this error; it will only look for an attempt to pass the empty sequence to an argument of type item()+. Thus the set of type errors considered by the two phases is actually quite different. One looks for potential errors, the other looks for actual errors. This should be clarified here.
This part of the processing model talks about dynamic errors and type errors (when the implementation does not perform static typing), which can be still raised statically if an implementation can detect that the error will necessarily occur at run time. This is somewhat orthogonal from the issue of static typing. This is somewhat editorial here. We may want to replace the following sentence: << A document type has an optional content type. If no content type is given, then the type is treated as being the wildcard type for documents, i.e., a sequence of text and element nodes. >> By the corresponding sentences taken from the XQuery book: << If the Static Typing Feature is in effect, all type errors are detected during static analysis and serve to inhibit the dynamic evaluation phase. Even though static typing can catch many type errors before an expression is executed, it is possible for an expression to raise an error during evaluation that was not detected by static analysis. >> - Jerome and Michael
Actually, I see that my comment was quoting a sentence in the 4 April 2005 draft, that has been removed in the 3 June 2005 draft, so I withdraw the comment.
Changing status to INVALID since Fred has indicated that there is no problem. /paulc