Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDeveloper v XMLSpy for XSD schema creation and validation

658835Sep 9 2008 — edited Sep 10 2008
Morning all,

I am currently using JDeveloper 10.0.3.4 to create an XSD schema, see below, however XMLSpy rejects the schema as invalid.

The issue is that I have 'element1' is listed twice within the 'choice' block; which does indeed look invalid to me.

Would anybody care to comment on :-

Why this is allowed in JDeveloper?
Is this a bug and if so how do I go about getting JDeveloper to validate the XSD correctly?

cheers

John.

-----------------------

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.foo.co.uk"
targetNamespace="http://www.foo.co.uk"
elementFormDefault="qualified">
<xsd:complexType name="Type1">
<xsd:choice>
<xsd:element name="element1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="6"/>
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="element1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="EMPTY"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:schema>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2008
Added on Sep 9 2008
3 comments
405 views