← Prev in month ← Prev in thread

xml schema error when deriving by extension

From
Anil Philip <>
To
xml dev <>
Date
2006-02-27T22:55:10Z
ID
<>
Thread
xml schema error when deriving by extension
Hello,
I am trying to derive from an existing type by
extension.
However I get the following error during validation in
XMLSpy:
"An 'all' model group is neither allowed in complex
type 'NodeType' nor in its extension
'RemoteNodeType'."

Where I have a tree of nodes consisting of

<xs:element name="AbcNode" type="NodeType"/>
<xs:complexType name="NodeType">
 <xs:all>
  <xs:element name="childNodes" type="ListOfNodes"/>
  <xs:element name="title" type="LocalSnippet"/>
  </xs:all>
 <xs:attribute name="id" type="xs:int"
use="required"/>
</xs:complexType>

I would like RemoteNodeType to extend NodeType and
contain two extra fields, url and id.

So I did:

<xs:element name="RemoteNode" type="RemoteNodeType"/>
  <xs:complexType name="RemoteNodeType">
    <xs:complexContent>
      <xs:extension base="NodeType">
         <xs:sequence>
 		<xs:element name="remoteNodeUrl"
type="RelativeURI"/>
		<xs:element name="remoteNodeId" type="xs:int"/>
       </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>


  However I get the error as above. I would really
appreciate any help since I am stumped. I
  went through the W3C XML Schema Primer, but could
not fix it.
thanks,
Anil Philip




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com
← Prev in month ← Prev in thread