OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] question about restrictions

[ Lists Home | Date Index | Thread Index ]

"Chiusano Joseph" <chiusano_joseph@bah.com> 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.

 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@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS