activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Cresswell (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-929) Invalid XSD (according to XML Spy)
Date Tue, 19 Sep 2006 19:42:27 GMT
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

        

Mime
View raw message