schema-element() and nillability
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
The specification for the type test
schema-element(E)
says that it should succeed if either (a) the element
declaration E is nillable, or (b) the element instance
is not nilled.
Currently it fails to match if the element instance is
nilled, regardless of whether the declaration is nillable.
Affects W3C test schvalid015.
I have not patched this in Subversion because it
changes the interface between Saxon-B and Saxon-SA
code. For my own records, the fix involves (a) changing
SchemaDeclaration to expose the isNillable() method of
ElementDecl, with an always-false implementation in
AttributeDecl, (b) changing ExpressionParser to test
this property and call
contentTest.setNillable(nillable) on line 1612.