Lists Home |
Date Index |
- From: <firstname.lastname@example.org>
- To: <email@example.com>
- Date: Fri, 27 Nov 1998 08:47:59 -0500 (EST)
Ketil Z Malde writes:
> Catching illegal values early on - in validation of the document -
> instead of relying on some obscure run-time error in some program,
> is a *feature*.
Agreed -- this is a very good choice, especially if you have human
The real question, though, is how constraints could be enforced.
Let's start with an extremely simple example:
What are the allowed contents? Certainly, +, -, and the digits 0-9
should be allowed, as well as the letter 'e', but which of the
following should throw an error?
There are three obvious answers:
1. Both are accepted.
2. Only one is accepted, and everyone learns to use that format.
3. Only the correct one for the current locale is accepted.
Option #2 is politically unworkable (either France or the U.S. would
take up arms), and option #1 seriously weakens validation (what if an
English author had mistakenly intended to use the comma to specify a
range?). Option #3 looks OK on the surface, but it is actually the
worst of the three because it destroys interoperability: same XML
document may be considered correct by some parsers and erroneous by
others, depending on what locale the user happened to choose.
This is a very simple example; after you've worked this out, you can
start worrying about how to count combining characters with
field-length restrictions, etc.
All the best,
David Megginson firstname.lastname@example.org
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)