logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Bug report] XSV Restriction Error: msg#00071

Subject: Re: [Bug report] XSV Restriction Error
"Martin Thomson" <martin.thomson@xxxxxxxxxx> 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@xxxxxxxxxxxx
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]




<Prev in Thread] Current Thread [Next in Thread>