[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

The First 2 Layers Problem and a tentative solution

  • From: Alexander Nakhimovsky <sasha@c...>
  • To: Eric van der Vlist <vdv@d...>, XML DEV <xml-dev@l...>,Michael Champion <mike.champion@s...>
  • Date: Wed, 14 Mar 2001 13:47:13 -0500

first 2 layers
"Layers" refers to recent discussions of layered architectures for XML 
processing.  I quote from Eric van der Vlist  [1]; see also Michael 
Champion [2]:

...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.

[1] http://lists.xml.org/archives/xml-dev/200103/msg00566.html
[2] http://lists.xml.org/archives/xml-dev/200103/msg00625.html
Alexander Nakhimovsky   tel 315-228-7586
Computer Science Dpt    fax 315-228-7004
Colgate University   sasha@c...
Hamilton NY 13346    sasha@m...
http://csproj.colgate.edu/adn.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.