Re: xsi:type

--- "Henry S. Thompson" <ht@cogsci.ed.ac.uk> wrote:
> Joe Forrest <curiousmejf@yahoo.com> writes:
> 
> > Hi All,
> > 
> > Will the uniqueness be enforced on "isbn"?
> > 
> > <?xml version="1.0"?>
> > <books
> >   xmlns="store"
> >  
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >   xsi:schemaLocation="store books.xsd">
> >   <isbn xsi:type="xsd:decimal">1234.0</isbn>
> >   <isbn xsi:type="xsd:decimal">1234</isbn>
> > </books>
> > 
> > where, the type of "isbn" is declared as
> > "anySimpleType" in books.xsd
> 
> Good question, presuming books.xsd (which you didn't
> include) makes
> . a key for <isbn> within <books>.
> 
> I think the answer is 'yes', that instance should
> raise an error --
> the values are the same.  xsi:type functions to
> establish a type for
> an element prior to all notions of PSVI content and
> value.  Key/keyref
> enforcement should be agnostic about where the type
> information which
> induced the values comes from.

Thanks Henry! Does this mean, in the above example, if
only one of the elements has xsi:type, then the
uniqueness constraint won't work:
<books ...>
  <isbn xsi:type="xsd:decimal">1234.0</isbn>
  <isbn>1234</isbn>
</books>

Well, I presume, if the xsi:type is in the second isbn
and not in the first isbn, above, then, the constraint
would be enforced. Is it true?.

Thanks,
Joe F.



> 
> ht
> -- 
>   Henry S. Thompson, HCRC Language Technology Group,
> University of Edinburgh
>           W3C Fellow 1999--2002, part-time member of
> W3C Team
>      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND
> -- (44) 131 650-4440
> 	    Fax: (44) 131 650-4587, e-mail:
> ht@cogsci.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]


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

Received on Tuesday, 29 October 2002 09:19:20 UTC