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

Does DTD validation work with namespaces?

  • From: "Paul W. Abrahams" <abrahams@v...>
  • To: xml-dev@x...
  • Date: Mon, 07 Aug 2000 15:50:04 -0400

namespace dtd
Rick JELLIFFE wrote:

> "Winchel 'Todd' Vincent, III" wrote:
>
> > 3. Namespaces
> >
> > Consensus on this list is they they don't work.  Certainly, DTD validation
> > and Namespaces don't work.  Nowhere is this stated in the W3C Namespace
> > Recommendation.
>
> Incorrect.  DTD validation does work with namespaces. Namespaces are a
> layer interpreted after validation. That is clear from the namespaces
> spec. It is not
> the consensus on this list that namespaces don't work: I use them every
> day
> and they work fine for my use.  (The namespaces spec is underspecified
> as far
> as URIs go, and does not give us the semantic web that some people think
> it
> should, and I think some of the non-normative appendixes are botched,
> but
> none of those things mean it does not work.)

This isn't the first time this issue has come up.  What's striking is that the
proponents of the opposing views (namespaces work with DTD's; they don't) treat
the answer as obvious and hardly worth discussion.

The problem I see is very simple.  If I publish a DTD for general use with the
intent that the names within it be declared by the importer as a namespace, then
that namespace has a prefix.  Since the DTD is intended to be universally
applicable no matter what the prefix of the namespace describing it, it cannot,
itself, use prefixed names: what prefix would it use?  And if the DTD's element
names are unprefixed while their uses in the document are prefixed, then
validation fails: names don't match definitions.

There is, to be sure, a way around this.  The DTD can prefix every name with an
entity reference, and the calling document can declare that entity reference to
have as its value the correct prefix, effectively parameterizing the DTD.  But
this is a kludge - an ugly, awkward kludge that I don't think anyone is defending
as an adequate solution.

It would be possible to solve this problem by extending the syntax of EntityDecl
to allow the specification of an implicit prefix for an included DTD, but that
would require integration of the Namespace spec into the XML spec.  Personally I
believe that would be a Good Thing, but it doesn't appear to be in the cards.

Paul Abrahams






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.