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 "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2009/11/18 08:04:39 UTC
[jira] Closed: (XERCESC-1187) Xerces SAX2 parser can not skip
xs:any if xsi:nil is used in xml
[ https://issues.apache.org/jira/browse/XERCESC-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-1187.
------------------------------------
Resolution: Fixed
Fix Version/s: 3.1.0
Assignee: (was: Xerces-C Developers Mailing List)
Works in 3.1.0.
> Xerces SAX2 parser can not skip xs:any if xsi:nil is used in xml
> ----------------------------------------------------------------
>
> Key: XERCESC-1187
> URL: https://issues.apache.org/jira/browse/XERCESC-1187
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (XML Schema)
> Affects Versions: 2.4.0
> Environment: Operating System: Solaris
> Platform: Sun
> Reporter: Andy Ding
> Fix For: 3.1.0
>
>
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org