You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Matthias Jung <ma...@xtradyne.com> on 2004/05/27 17:18:50 UTC

xsi:nil="1" problem

Hi all,

while performing XML Schama validation with SOAP messages created by 
Axis, I ran into a problem validating complex type elements containing 
the attibute 'xsi:nil="1"'. Even defined as nillable in the schema 
definition the validator created an error indicating the element would 
not be valid for its content model.

Changing the nil attribute to 'xsi:nil="true"' everything works fine.

XML Schema specification defines the nil attribute of type boolean that 
allows '1' as a valid boolean value.

Having a first look in the sources I discovered 
SGXMLScanner::scanRawAttrListforNameSpaces(int attCount) only checking 
for 'true' but not for '1'.

So my questions:
Is the value '1' for nil attributes not supported by xerces?
If so, is there a special reason, or am I misinterpreting XML Schema Spec?
A quick fix in SGXMLScanner did not affect the wrong behaviour. So is 
this part of code the correct place to look for? Maybe Ihave to look 
some deeper into the sources and do some printf-debugging


Thanks for clarification and help

Matthias


P.S. This problem occurs with xerces version 2.1 - 2.5