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

Re: question about restrictions


Re: question about restrictions
"Henry S. Thompson" <ht@i...> wrote in message
f5b3c4nbzul.fsf@e...">news:f5b3c4nbzul.fsf@e......
> "Chiusano Joseph" <chiusano_joseph@b...> writes:
>
> > I believe you found the cause in your explanation below - the
> > restriction is not actually a restriction. You would have to - for
> > example - change one of the maxOccurs facets from "unbounded" to "5" (or
> > anything other than "unbounded").
>
> Sorry, that's not a problem -- vacuous restriction is allowed.  I
> don't know the details of the validator involved, but I would guess
> that the problem is that you're using anonymous type definitions -- 
> W3C XML Schema requires the type definition of an element in a restriction
to be
> the same as or derived from the type definition of the corresponding
> element, and it only _guarantees_ identity for type definitions with
> names.  So move that anonymous definition up to the top level, give it
> a name, and refer to it _by_ name, i.e.
>
>   <xsd:element name="FirstElement" type="myChoiceType"/>
>
> in both base and restriction, and you should win.
>
> ht
> -- 
>  Henry S. Thompson, HCRC Language Technology Group, University of
Edinburgh
>                      Half-time member of W3C Team
>     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
>             Fax: (44) 131 650-4587, e-mail: ht@i...
>                    URL: http://www.ltg.ed.ac.uk/~ht/
> [mail really from me _always_ has this .sig -- mail without it is forged
spam]
>

I tried you're solution not 5 minutes before reading your reply and it
resolved the problem.  So, it does appear the anoymous type were the cause.

Thank you both for your replies,

Brent Worden




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.