Invalid XSD (according to XML Spy)
----------------------------------

                 Key: AMQ-929
                 URL: https://issues.apache.org/activemq/browse/AMQ-929
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 4.1
         Environment: N/A
            Reporter: Stephen Cresswell
            Priority: Minor


XmlSpy reports 
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd
 is invalid with the following message:

<xs:element ref='tns:topic'> makes the content model non-deterministic. 
Possible causes: name equality, overlapping occurance or substitution groups.

It's complaining because it has no way to validate whether it should validate 
against tns:topic/tns:queue or the xs:any for the following element

<xs:element name='destination' minOccurs='0' maxOccurs='1'>
   <xs:complexType>
      <xs:choice minOccurs='0' maxOccurs='1'>
         <xs:element ref='tns:queue'/>
         <xs:element ref='tns:topic'/>
         <xs:any/>
      </xs:choice>
   </xs:complexType>
</xs:element>

Possible fix adapted from 
http://www.thescripts.com/forum/threadedpost1605613.html:

<xs:element name="destination" minOccurs="0" maxOccurs="1">
        <xs:complexType>
                <xs:choice minOccurs="0" maxOccurs="1">
                        <xs:element name="extensions">
                                <xs:sequence maxOccurs="1">
                                        <xs:any/>                               
                                </xs:sequence>
                        </xs:element>
                        <xs:element ref="tns:queue"/>
                        <xs:element ref="tns:topic"/>
                </xs:choice>
        </xs:complexType>
</xs:element>

But I suspect difficult to fix as the XSD is autogenerated + you'll lose 
backwards compatability with previous documents. The problem occurs repeatedly 
throughout the schema.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to