Does DTD validation work with namespaces?
by Paul W. Abrahams other posts by this author
Aug 7 2000 7:50PM messages near this date
Re: Does DTD validation work with namespaces?
|
RE: Does DTD validation work with namespaces?
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
Thread:
Paul W. Abrahams
Rick JELLIFFE
W. E. Perry
Jonathan Borden
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
John F. Schlesinger
Jonathan Borden
Simon St.Laurent
W. E. Perry
John Cowan
Rick JELLIFFE
Rick JELLIFFE
Sean McGrath
Simon St.Laurent
Jonathan Borden
Sean McGrath
Rick JELLIFFE
Rick JELLIFFE
Simon St.Laurent
James Robertson
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
Paul W. Abrahams
Jonathan Borden
Paul W. Abrahams
Rick JELLIFFE
Dan Vint
Rick JELLIFFE
Marcus Carr
Michael Champion
John Cowan
John Cowan
John Cowan
Michael Champion
Winchel 'Todd' Vincent, III
John Cowan
Jonathan Borden
sam th
Jonathan Borden
Simon St.Laurent
John Cowan
John Cowan
John Cowan
Simon St.Laurent
Richard Lanyon
John Cowan
Jonathan Borden
John Cowan
Simon St.Laurent
John Cowan
Jonathan Borden
Rick JELLIFFE
james anderson
Winchel 'Todd' Vincent, III
Winchel 'Todd' Vincent, III
Rick JELLIFFE
Norman Walsh
Jonathan Borden
Winchel 'Todd' Vincent, III
Jonathan Borden
Norman Walsh
Winchel 'Todd' Vincent, III
Amy Lewis
Eric Bohlman
John Cowan
Simon St.Laurent
Jeff Greif
Jonathan Borden
Elliotte Rusty Harold
Sean McGrath
Simon St.Laurent
Joe English
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
W. E. Perry
Jonathan Borden
John Cowan
John Cowan
Sean McGrath
W. E. Perry
John F. Schlesinger
Sean McGrath
Michael Champion
Michael Champion
Paul W. Abrahams
John Cowan
Paul W. Abrahams
Paul W. Abrahams
Simon St.Laurent
Martin Gudgin
Jonathan Borden
Simon St.Laurent
Tim Bray
Jonathan Borden
Jack Rusher
Steve Rowe
|