|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What are the characteristics of a good type system for XML
Hi Arjun, > Jeni Tennison <jeni@j...> wrote: > | Finally, I think that there should be limits on the scope of a type > | definition. XML types like ID and ENTITY have too wide a scope, in my > | opinion, in that they specify constraints across entire documents as > | well as on particular lexical representations. > > I don't understand the problem here. Could you clarify? > > Declared values such as ID, NOTATION, IDREF and ENTITY (and the > plurals of the last two) are just NAMEs, as far as "types" are > concerned, it seems to me. Is this lexical form too constraining? > For NOTATION and ENTITY, what purpose could a scope less than the > document serve (given that referents are in the DTD rather than the > instance)? My point was that they're not just names. If you declare an attribute as being of type ID, you not only say that the attribute must have a value that meets the lexical constraints of being a name, you also say that no other ID-type attribute in the document has the same value. If you declare an attribute as being of type ENTITY, as well as stating the format of the value of the attribute you state that there is an unparsed entity declared in the DTD with that name. And so on for NOTATION, IDREF and so on. They don't just constrain the value of the attribute, they constrain other aspects of the document. > I think the real problem is that declared values don't square with > the usual notions of "type" (as in "data type"), so a type system of > the kind under discussion should probably leave them out altogether > except as just plain and simple NAMEs. Yes, I agree. I think that the other kinds of constraints that these types impose should be dealt with at a different level of validation. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








