[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Created: (XMLBEANS-340) "derivation-ok-restriction.5.1"
From:       "Daniel LaPrade (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2007-07-21 0:41:06
Message-ID: 22587627.1184978466270.JavaMail.jira () brutus
[Download RAW message or body]

"derivation-ok-restriction.5.1" failure thrown incorrectly 
-----------------------------------------------------------

                 Key: XMLBEANS-340
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-340
             Project: XMLBeans
          Issue Type: Bug
    Affects Versions:  Version 2.3
         Environment: MacOSX, Java1.5
            Reporter: Daniel LaPrade


I downloaded the DublinCore xml schemas and tried to create xmlbeans of them and got \
several "derivation-ok-restriction.5.1" error messages:

[xmlbean] schemas/dcterms.xsd:130:3: error: derivation-ok-restriction.5.1: A complex \
type with a simple content model can only restrict a complex type with simple or \
mixed content model.

The problem is here is the line in question:

  <xs:complexType name="MESH">
   <xs:simpleContent>
    <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:string"/>
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited"/>
    </xs:restriction>
   </xs:simpleContent>
  </xs:complexType>

Here is the base for the restriction:

  <xs:complexType name="SimpleLiteral">
   <xs:complexContent mixed="true">
    <xs:restriction base="xs:anyType">
     <xs:sequence>
      <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
     </xs:sequence>
     <xs:attribute ref="xml:lang" use="optional"/>
    </xs:restriction>
   </xs:complexContent>
  </xs:complexType>

As you can see, the complex type with a simple content model is restricting a complex \
type with mixed content model.

This seems like an error.

-- 
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic