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

Re: A request for some help with ambigious error messages and


pdman
On Fri, Dec 23, 2005 at 10:42:22PM -0800, thewade wrote:
> 3. What exactly is a namespace if not a DTD. Because the w3c xhtml 
> namespace appears to be a page that itself links to a DTD and otherwise 
> had no code value.

A namespace is a binding between a set of names and a URI.
The purpose is to let software recognise when two names are
the same and when they are different.  This (for example) makes it
possible to combine fragments of different vocabularies using
(almost) cut and paste (if you add the namespace declarations)
to make meaningless gibberish without conflict between names.

The namespaces recommendation says nothing about DTDs or
schemas of any kind, and indeed nothing about what you get if
you try to defererence a namespace URI.

You could think of namespaces in XML as like namespaces in C++,
or qualified names in Perl, e.g. modulename::name, except that
it's entirely at the syntax level, so there's not really a concept
of an undefined name as there is in C++ or Perl.

You can't write a DTD that understands namespaces, but you can write
one that will validate if you use a particular prefix.  You can even
parameterise the prefix, so you have to add a declaration like
<!ENTITY % prefix "xxx">
in your document (which will make many XML processors ignore the rest
of your internal subset and will make Web browsers take off their
shirts and run around screaming the lyrics from Hiawatha).

Often it's best to avoid DTDs when namespaces are involved :(

> So the first question is most important, the second two are academic.
I'll answer just the third, then, since this is xml-dev :-)

Best,

Liam

-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/

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.