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/02/16 22:43:59 UTC

[Bug 629] New - Schema validator doesn't correctly handle mixed content with wildcard child

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

*** shadow/629	Fri Feb 16 13:43:59 2001
--- shadow/629.tmp.13823	Fri Feb 16 13:43:59 2001
***************
*** 0 ****
--- 1,48 ----
+ +============================================================================+
+ | Schema validator doesn't correctly handle mixed content with wildcard chil |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 629                         Product: Xerces-J                |
+ |       Status: NEW                         Version: unspecified             |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Normal                   OS/Version: All                     |
+ |     Priority:                           Component: Schema-Structures       |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-j-dev@xml.apache.org                                  |
+ |  Reported By: todd.schwartz@intel.com                                      |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ This bug pertains to Xerces-J version 1.3.0.
+ 
+ Given the following schema:
+ 
+   <?xml version="1.0" encoding="UTF-8"?>
+   <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" 
+ elementFormDefault="qualified">
+     <xsd:element name="ROOT">
+       <xsd:complexType mixed="true">
+         <xsd:sequence>
+           <xsd:any namespace="##any" processContents="lax"/>
+         </xsd:sequence>
+       </xsd:complexType>
+     </xsd:element>
+   </xsd:schema>
+ 
+ and the following instance document:
+ 
+   <?xml version="1.0" encoding="UTF-8"?>
+   <ROOT xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" 
+ xsi:noNamespaceSchemaLocation="test.xsd">
+     <CHILD/>
+   </ROOT>
+ 
+ the schema validator generates two errors:
+ 1. Element type "CHILD" must be declared.
+ 2. The content of element type "ROOT" must match "(#PCDATA|##any)".
+ 
+ If the mixed attribute in the schema is changed to "false", no errors are 
+ generated. 
+ 
+ I would expect the validation to succeed in either case.