|
[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [Bug report] XSV Restriction Error
From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 21 Apr 2005 09:34:29 +0100 To: "Martin Thomson" <martin.thomson@nortel.com> Cc: Michael Kay <mike@saxonica.com>, xmlschema-dev@w3.org Message-ID: <f5b8y3c1qay.fsf@erasmus.inf.ed.ac.uk> "Martin Thomson" <martin.thomson@nortel.com> writes: > For example: > > Top = (x : anyType, ##any) > Middle = (x : string, y : anyType) > Bottom = (x : string, y : string) Right, on the proposed 1.1 story, that's not allowed _unless_ y is declared at the top-level with anyType. > However, element y cannot be declared globally, as required by "strict" > because its type cannot then be restricted as shown. Why not? Restricting top-level with local is allowed. Instances which look like this <top><x>...</x><y>...</y></top> will be validated with y : anyType, not y : string, but I don't see what else you expect. You can always do <top xsi:type="BottomType"><x>...</x><y>...</y></top> > For my own understanding, what benefit does this change provide? Make what it says at the beginning of the 1.0 REC actually true :-). "Members of a type, A, whose definition is a ·restriction· of the definition of another type, B, are always members of type B as well." That invariant in turn makes processing schema-validated material to make important assumptions based on the types assigned to items in the infoset. 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@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]Received on Thursday, 21 April 2005 08:34:35 GMT |
Subscribe in XML format
|

![Re: [Bug report] XSV Restriction Error](/images/get_stylus.gif)




