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 bu...@apache.org on 2004/04/04 11:49:18 UTC
DO NOT REPLY [Bug 28186] New: -
Xerces SAX2 parser can not skip xs:any if xsi:nil is used in xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28186>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28186
Xerces SAX2 parser can not skip xs:any if xsi:nil is used in xml
Summary: Xerces SAX2 parser can not skip xs:any if xsi:nil is
used in xml
Product: Xerces-C++
Version: 2.4.0
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Critical
Priority: Other
Component: Validating Parser (Schema) (Xerces 1.5 or up only)
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: andy.ding@ericsson.com
We're using Xerces-C++ version 2.4.0. Now we found an error about xerces SAX2
parser can not skip xs:any type if "xsi:nil=true" is used in xml.
As you can see, in following "note.xml", the element "school" should be
validated by another schema file defining this element, not by the schema file
defining "xs:any".
The schema example:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified"
targetNamespace="http://www.w3schools.com">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The xml example:
<?xml version="1.0"?>
<note xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com note.xsd">
<to>Tove</to>
<from>Jani</from>
<school>
<student xsi:nil="true"/>
</school>
</note>
The error message:
Error at file 10000, line 15, char 8
Message: Element note with attribute xsi:nil=true must be empty
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org