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

Re: Summary of Namespaces and Validation

  • From: matt@v...
  • To: xml-dev@i...
  • Date: 10 Sep 1998 13:47:28 -0700
  • Date: Thu, 10 Sep 1998 13:47:28 -0700 (PDT)

Re: Summary of Namespaces and Validation
> >*****************************************
> >	Camp 2 : Tim Bray, Andrew Layman
> >*****************************************
> >		To validate a document that uses namespaces, do  all
> >		the ELEMENT and ATTRIBUTE handling using the Expanded
> >		Names.
> >	This group thinks namespaces coexist with DTD's, provided
> >	both the DTD and the document instance specify consistent
> >	URI's for the namespaces. The actual prefix abbreviations
> >	used in the DTD or the document instance don't matter.
> 
> Not quite right.  The prefixes are stand-ins for the URIs.  However,
> the prefixes are all the DTD processor can see.  Thus, validating 
> namespaced documents *has* to be a 3-step process.
> 
> 1. Build a compound DTD that has prefixed declarations for all your
>    elements and attributes.  This is the hard part.
> 2. Go through the instance and rewrite all the namespace declarations onto
>    the root element and undo any defaulting, so that anything that's in
>    a namespace has a prefix.  If necessary, rewrite the DTD so that the
>    same URIs have the same prefixes in DTD and instance.  This is tedious
>    but straightforward, there are dozens of programmers in this group
>    who could sort it out in a day, given a decent XML processor.
> 3. Validate (or not, if the doc is broken).
> 

And if we'd kept the PI declaration syntax, none of those three steps
would be necessary.  

In fact, now that I think about it, we really want a way to declare
namespaces in the DTD, so we don't need to do a rewrite/normalization
kluge which means that if you want to use namespaces and validate, expect
your parser to crawl.  

At the same time, we really want prefix declarations within the DTD to
have no effect in the instances (i.e., the instance is free to use its
own set of prefixes), and vice versa.  Otherwise, you'd have to read
the DTD to check a well-formed namespace instance.  This would indicate
we can leave the current WD alone as far as instances are concerned,
but could bring back the PI syntax for declarations within the
external and internal subsets, with the understanding they have no
impact on the rest of the instance (and vice versa).

> What really bothers me is that discussion here keeps obsessing over the
> tedious but straightforward problem of matching up prefixes, and nobody's
> thinking about the interesting and difficult problem of compounding DTDs.

If we do what I just suggest above, the issue will be resolved,
everyone will be happy, and we can start addressing more interesting
issues.

Matthew Fuchs
matt@v...

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.