OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] What are the characteristics of a good type system for XML

[ Lists Home | Date Index | Thread Index ]

Hi Arjun,

> Jeni Tennison <jeni@jenitennison.com> 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/





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS