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

RE: Namespaces and DTDs

  • From: Ronald Bourret <rbourret@i...>
  • To: "xml-dev@i..." <xml-dev@i...>
  • Date: Tue, 9 Mar 1999 10:42:29 +0100

RE: Namespaces and DTDs
Elliotte Rusty Harold wrote:

> I have several DTDs with conflicting definitions of certain elements.
> (e.g one defines a HEAD as a TITLE followed by a META and another
> defines a HEAD as #PCDATA). I need to use all the DTDs and associated
> markup languages for a single document.
>
> To an extent I can disambiguate them with namespaces.  However, is there
> any way I can do this while still validating against the orignal DTDs?
> That is without rewriting the DTDs to use the qualified names instead of
> the orignal names that are in the DTDs? I've been trying to work with
> default values for xmlns attributes, and the like; but that doesn't seem
> to get me quite all the way to where I need to go. Am I going to have to
> break down and just rewrite the DTDs to use the qualified names?

If you want to use a namespace-unaware parser, I don't see how you can 
avoid rewriting the DTDs.  Unless the names in the DTDs are qualified, you 
will have two elements with the same name (e.g. "HEAD"), which is a 
validation error.  And even assuming that this isn't immediately flagged, I 
can see no way for a namespace-unaware parser to figure out which content 
model to validate against when it encounters one of the duplicated element 
names: If prefixes are used, the name won't match any of the DTD names; if 
prefixes are not used (due to use of defaults), the name will match 
multiple DTD names.

Note that this problem is not limited just to validation.  At the very 
least, it applies to retrieving default attribute values as well.

-- Ron Bourret


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/ and on CD-ROM/ISBN 981-02-3594-1
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.