[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml schema error when deriving by extension

  • To: xml dev <xml-dev@l...>
  • Subject: Re: xml schema error when deriving by extension
  • From: Anil Philip <goodnewsforyou@y...>
  • Date: Tue, 28 Feb 2006 06:43:45 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Nz7Xpp61LO3+K5RnllTttvuSQ2tQny6GXgAvYvawaY0k5gUg8dWfVCG8XaXKStfqrKWiAqoi+sauktFi6secRQDTznDqSH1B+SsrnMTno0O48XFCgF/r9azwgjOl7l7yauKWbrrr4YV4TC+tB7XwV4FSkc+LgLOS966DJdEUOtE= ;
  • In-reply-to: <20060227225511.67108.qmail@w...>

xs extension
Qs: Why is 'all' not allowed in the base type when you
are trying to extend it?
When I change the 'all' to 'sequence' in the *base*
type, it accepts it.


--- Anil Philip <goodnewsforyou@y...> wrote:

> 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 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.