DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17633>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Empty complex type definition is always non-mixed even if declaration says otherwise

           Summary: Empty complex type definition is always non-mixed even
                    if declaration says otherwise
           Product: Xerces-C++
           Version: 2.2.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If you try validating the attached files using "SAXCount -n -s event1.xml", 
you will the error "No character data is allowed by content model".
The content model for the "description" element is defined as 

  <xs:element name="description">
    <xs:complexType mixed="true"/>
  </xs:element>

but Xerces still consider it as not being mixed.
The following patch should fix the problem.

Alberto

===================================================================
RCS file: /home/cvspublic/xml-
xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp,v
retrieving revision 1.61
diff -u -r1.61 TraverseSchema.cpp
--- TraverseSchema.cpp  26 Feb 2003 19:30:10 -0000      1.61
+++ TraverseSchema.cpp  4 Mar 2003 10:39:51 -0000
@@ -1196,22 +1196,22 @@
     // Process the content of the complex type declaration
     // ------------------------------------------------------------------
     try {
+        const XMLCh* mixedVal = getElementAttValue
(elem,SchemaSymbols::fgATT_MIXED);
+        bool isMixed = false;
+
+        if ((mixedVal && *mixedVal)
+            && (XMLString::equals(SchemaSymbols::fgATTVAL_TRUE, mixedVal)
+                || XMLString::equals(fgValueOne, mixedVal))) {
+            isMixed = true;
+        }
+
         if (child == 0) {
             // EMPTY complexType with complexContent
-            processComplexContent(elem, name, child, typeInfo, 0,0,0, false);
+            processComplexContent(elem, name, child, typeInfo, 0,0,0, 
isMixed);
         }
         else {
 
             const XMLCh* childName = child->getLocalName();
-            const XMLCh* mixedVal = getElementAttValue
(elem,SchemaSymbols::fgATT_MIXED);
-            bool isMixed = false;
-
-            if ((mixedVal && *mixedVal)
-                && (XMLString::equals(SchemaSymbols::fgATTVAL_TRUE, mixedVal)
-                    || XMLString::equals(fgValueOne, mixedVal))) {
-                isMixed = true;
-            }
-
             if (XMLString::equals(childName, 
SchemaSymbols::fgELT_SIMPLECONTENT)) {
 
                 // SIMPLE CONTENT element

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to