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

Re: Namespace Comments (and dtd encoding)

  • From: rbourret@d... (Ron Bourret)
  • To: xml-dev@i...
  • Date: Wed, 5 Aug 1998 11:55:41 +0200

namespace comment
> The point is - I think - that the DTD parser is completely dumb. It doesn't
> care about colons (except to recognise that they are legal). I assume -
> though I haven't tried it - that this DTD will validate the example with
> any of the current parsers.

My first reaction was that it was dumb, too, but at some point, it's got to get 
smart.  That is, it needs to resolve the prefixes in the DTD to determine what 
elements are being defined.  As far as I can see, the new spec does not define 
when this occurs.  The only relevant information I can find is that it 
specifically omits the 'Prefix Declared' constraint from the DTD productions 
([12]-[17]).

In the worst possible case, you would have to resolve the DTD prefixes every 
time there is a change in namespace declarations.  Not only is this extremely 
ugly, it would lead to abuse such as the following, where the second A is in a 
different namespace than the first A and both A's are declared with a single 
element declaration:

<!DOCTYPE A [
<!ELEMENT foo:A (B)>
<!ELEMENT B (#PCDATA, foo:A)*>
<!ATTLIST A xmlns:foo CDATA #IMPLIED>
<!ATTLIST B xmlns:foo CDATA #IMPLIED>
]>
<foo:A xmlns:foo="[first URI]">
   <B xmlns:foo="[second URI]">
      <foo:A>
         <B>asdf</B>
      </foo:A>
   </B>
</foo:A>

A more reasonable solution might be a namespace constraint that says that all 
DTD prefixes must be declared on the root element.  However, without thinking 
this through too carefully, I suspect you lose a good deal of flexibility.

Could someone in the know comment on how this is supposed to be solved, or point 
us to the relevant portion of the spec in case we're missing something obvious?  
Thanks.

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