ORA-XQ-210-C: The specification of "nillable" is confusing

SECTION 2.4.4.3: Matching an Element Test and an element Node

Item 2)b) says "type-matches(TypeName, AT) is true, where AT is 
the type of the given element node.  
However, if the given element node has the 
nilled property, then this rule is satisfied only if TypeName 
is followed by the keyword nillable."   

This paragraph is confusing.  I can come up with two different
interpretations of it. 
There are four cases to consider, in a two-by-two matrix.
One axis of the matrix is whether AT has xsi:nil='true' or not.
The other axis is whether nillable is specified or not.

One interpretation, which I think is the most literal, is to
regard the sentence beginning "However" as an additional 
requirement if At has xsi:nil='true'. That is, to pass the test, the element must satisfy type-matches (TypeName, AT), and, nillable
must be specified.  This produces the following 

AT has xsi:nil='true'     nillable specified         satisfied
AT has xsi:nil='true'     nillable not specified     not satisfied
AT lacks xsi:nil='true'   nillable specified         not satisfied
AT lacks xsi:nil='true'   nillable not specified     not satisfied

The other interpretation I would express using the following
language:

b. type-matches(TypeName, ATT) is true, where AT is obtained 
from the type AT of the given element node by overriding the 
nillability of AT as follows: ATT is nillable if and only if
the keyword nillable is specified. 

The two examples at the end of this section support the latter
interpretation.

- Steve B.

Received on Monday, 16 February 2004 16:39:19 UTC