(Clarification on xsi:type) was Re: Simplifying XML Schema

 
> From: Henry S. Thompson (ht@cogsci.ed.ac.uk)
 
> That's fine, you don't need any new features then:  use
> <any processContents='strict' minOccurs='0' maxOccurs='unbounded'/>
> and xsi:type in the instances and you'll have (nearly) everything you
> want.
 
Just for general clarification, is it possible to have an attribute
(xsi:type or something derived from it somehow) which allows type
selection from an attribute, but constrained to certain choices?  

Perhaps that would cover both XML DTDs' NOTATION list attribute type and
perhaps P. Wadler's case.  I think he wants to have a method of
constraining which of two or more unrelated types are allowed.

(Currently, I don't think it is possible: to do it, a schema processor
would  have to do something like first look at the nominal type for that
element name, check that the xsi:type attribute had a valid value using
that type declaration, then continue on using that xsi:type attribute's
value as the type name. )

Rick Jelliffe

Received on Friday, 9 June 2000 09:27:16 UTC