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
<?xml version="1.0" encoding="ISO-8859-1"?> <ns:A xmlns:ns="xxx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <B xsi:nil="1"/> </ns:A>
<xsd:schema targetNamespace="xxx" xmlns:tns="xxx" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="B">
<xsd:sequence>
<xsd:element name="b1" type="xsd:string"/>
<xsd:element name="b2" type="xsd:string"/>
<xsd:element name="b3" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="A">
<xsd:sequence>
<xsd:element name="B" type="tns:B" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="A" type="tns:A"/>
</xsd:schema>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
