[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The First 2 Layers Problem and a tentative solution
- From: Alexander Nakhimovsky <firstname.lastname@example.org>
- To: Eric van der Vlist <email@example.com>, XML DEV <firstname.lastname@example.org>,Michael Champion <email@example.com>
- Date: Wed, 14 Mar 2001 13:47:13 -0500
"Layers" refers to recent discussions of layered architectures for XML
processing. I quote from Eric van der Vlist ; see also Michael
...we have already at least 5 (optional) layers (more if you add XLink and
XInclude): well formed XML before entity substitution, well formed XML
after entity substitution, validated XML, namespaced XML and typed XML
There is a persistent awkwardness about the first two layers resulting from
DTDs doing double duty: they both validate structure and (speaking
anachronistically) fill in the Infoset, primarily by resolving general
parsed entities and providing default attribute values. While attribute
defaults can be avoided, general parsed entities provide a genuinely useful
functionality, in my opinion. The problem is that, in order to make use of
it, one needs a DTD and either a non-validating parser that resolves
entities (which they are not required to do) or a validating parser and DTD
validation. The latter option messes up layers, brings in all the problems
with Namespaces, and results in duplication of effort if we then proceed to
post-validate with e.g., TREX. I wonder if the following small steps can
help alleviate the problem:
1. Explicitly deprecate attribute defaults.
2. Make a small change in the Conformance section of XML 1.0 requiring
non-validating processors to expose entity resolution as a (settable)
feature (in API terms, in addition to isValidating() and setValidating()
provide isEntityResolving() and setEntityResolving()).
3. Recommend the following usage of DTDs:
<!DOCTYPE docType [
<!ELEMENT docType ANY>
<!-- declare general parsed entities -->
4. Use the DTD to resolve entities, either using a non-validating
entity-resolving parser or a validating parser with validation on.
5. Do structural validation on the Namespaced XML using, e.g., TREX. On
the same pass, if needed, proceed to typed XML (by which I assume we mean
simple types only).
This will clean up the layers a little bit, and all of it can be done today.
Alexander Nakhimovsky tel 315-228-7586
Computer Science Dpt fax 315-228-7004
Colgate University firstname.lastname@example.org
Hamilton NY 13346 email@example.com