simplecontent that extends itself, is that valid??

E

Eric D

Hi,
is such a complex type valid?
<xsd:complexType name="EthnicityCodeType">
<xsd:simpleContent>
<xsd:extension base="nibrs:EthnicityCodeType">
<xsd:attributeGroup ref="j:SuperTypeMetadata"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Thanks for your answers.
Eric
 
U

usenet

Hi,
is such a complex type valid?
<xsd:complexType name="EthnicityCodeType">
<xsd:simpleContent>
<xsd:extension base="nibrs:EthnicityCodeType">
<xsd:attributeGroup ref="j:SuperTypeMetadata"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
Thanks for your answers.
Eric

Assuming this is a definition in the namespace associated with the
namespace prefix nibrs...

I couldn't explicitly find text in the spec that prevents this, but
even if it is intended to be allowed (rather than just not considered)
I would say that it is a corner case and best avoided.

OTOH - if nibrs:EthnicityCodeType is in a different namespace then it
is obviously OK.

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================
 
G

George Bina

Hi Eric,

You cannot do that, for more details see
http://www.w3.org/TR/xmlschema-1/#ct-props-correct
Point 3:
***
3 Circular definitions are disallowed, except for the ·ur-type
definition·. That is, it must be possible to reach the ·ur-type
definition· by repeatedly following the {base type definition}.
***

Best Regards,
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,865
Latest member
AveryHamme

Latest Threads

Top