You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/09/10 20:42:30 UTC
[DO NOT REPLY: Bug 3532] New:
nillable / xsi:nil validation problem
PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3532
*** shadow/3532 Mon Sep 10 11:42:29 2001
--- shadow/3532.tmp.8800 Mon Sep 10 11:42:30 2001
***************
*** 0 ****
--- 1,58 ----
+ +============================================================================+
+ | nillable / xsi:nil validation problem |
+ +----------------------------------------------------------------------------+
+ | Bug #: 3532 Product: Xerces-J |
+ | Status: NEW Version: 1.4.3 |
+ | Resolution: Platform: PC |
+ | Severity: Blocker OS/Version: Windows NT/2K |
+ | Priority: Other Component: SAX |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: usabailey@hotmail.com |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ Validated against this schema (d:\xml-dev.xsd),
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:complexType name="KeyRefType">
+ <xs:attribute name="idref" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="test">
+ <xs:all>
+ <xs:element name="foo" type="KeyRefType" nillable="true"/>
+ <xs:element name="bar" type="KeyRefType"/>
+ </xs:all>
+ </xs:complexType>
+
+ <xs:element name="test" type="test"/>
+ </xs:schema>
+
+ This instance document will parse without error,
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="xml-dev.xsd">
+ <bar idref="idx"/>
+ <foo xsi:nil="true"/>
+ </test>
+
+
+ Whereas this instance document fails
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="xml-dev.xsd">
+ <foo xsi:nil="true"/>
+ <bar idref="idx"/>
+ </test>
+
+ with this error
+
+ main : org.xml.sax.SAXException: org.xml.sax.SAXParseException: General Schema
+ Error: xsi:nil must not be specified for the element bar with {nillable}
+ equals 'false'. in file:///D:/xml-dev.xml at line 4, column 20.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org