- From: Richard Tobin <richard@inf.ed.ac.uk>
- Date: Fri, 22 Apr 2005 12:07:49 +0100 (BST)
- To: Rich Salz <rsalz@datapower.com>, Norman Walsh <Norman.Walsh@Sun.COM>
- Cc: "public-xml-core-wg@w3.org" <public-xml-core-wg@w3.org>
> I don't have a DTD yet want to constrain input to valid XML documents. > Why can't I say "this is a valid XML document" without requiring everyone > to have access to the DTD? Why can't I uniqueness of ID be determined > out of band, such as by schema? If I understand you correctly, you seem to be equating validity with uniqueness of IDs, which is only a small part of validity as the term is normally used. Is that right? Are you in fact asking for a way to assert just well-formedness plus uniqueness of IDs? Just to be clear, here are the things which between them constitute XML validity: - all elements, attributes, and notations must be declared - each element must be declared only once - the root element must have the correct name - the sequence of children must match the content model of parent - all required attributes must be present - attribute values must conform to their declared type - all entities must be declared (in some cases, this is part of - there must be at most one ID attribute per element - there must be at most one notation attribute per element - all ID values referred to be IDREF attributes must be defined - #FIXED attributes must have the declared value - ID values must be unique - "standalone" constraints must be met - all entities must be declared (in some cases, this is part of well-formedness) - logical and physical structure must be consistent (eg an element's start and end tags must be in the same entity) - various rules about the DTD itself must be met -- Richard
Received on Friday, 22 April 2005 11:07:56 UTC