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/06/14 21:09:14 UTC

[Bug 2187] New: - with fixed value has xsi:nil="true", no error reported

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2187

*** shadow/2187	Thu Jun 14 12:09:14 2001
--- shadow/2187.tmp.20232	Thu Jun 14 12:09:14 2001
***************
*** 0 ****
--- 1,40 ----
+ +============================================================================+
+ | <element> with fixed value has xsi:nil="true", no error reported           |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2187                        Product: Xerces-J                |
+ |       Status: NEW                         Version: 1.4                     |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Minor                    OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: Schema-Structures       |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-j-dev@xml.apache.org                                  |
+ |  Reported By: mhuffman@ca.ibm.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ A constraint in XML Schema Structures spec:
+ 
+ http://www.w3.org/TR/2001/PR-xmlschema-1-20010316/#cvc-elt
+ 
+ indicates (in constraint sub-section 3.2.2) that an <element> which is nillable 
+ and has xsi:nil="true" in an instance document must *not* have a fixed value in 
+ the schema.  Here's an example which violates this constraint and no error is 
+ reported by the parser.
+ 
+ xc2_6ii01.xsd
+ =============
+ <?xml version="1.0"?>
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ 
+ <xs:element name="Root" type="xs:string" nillable="true" fixed="a"/>
+ 
+ </xs:schema>
+ 
+ xc2_6ii01d.xml
+ ==============
+ <?xml version="1.0"?>
+ <Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="xc2_6ii01.xsd"
+       xsi:nil="true"/>
\ No newline at end of file

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org