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

Re: Why namespaces?

  • From: Paul Prescod <paul@p...>
  • To: XML-Dev Mailing list <xml-dev@i...>
  • Date: Sun, 29 Aug 1999 17:44:40 -0400

why use xmlns
> Who said that they cannot be mixed?  

The XHTML specification: "Future work by W3C will address ways to
specify conformance for documents involving multiple namespaces."

> XHTML documents cannot (yet)
> contain markup from other Namespaces, but anyone else designing a
> document type is free to include HTML markup in theirs (say, for
> documentation in a schema).

What is the point of referencing a specification if you cannot define
conformance? I would say that it is downright a bad idea to "mix in"
HTML until there are rules for what is legal or not legal in doing so.
Right now, this is perfectly legal:

<book xmlns='urn:loc.gov:books'
       xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en">
  <title>Cheaper by the Dozen</title>
  <!-- make HTML the default namespace for a hypertext commentary -->
  <p xmlns='http://www.w3.org/TR/xhtml1/strict'>
This is <title>also <table>available <a
href="http://www.w3.org/">online</a>
 </table>.... </title>.
        </p>
    </notes>
</book>

I personally don't think that the XHTML specification should even
mention the possibility of mixing in without defining contraints or
semantics.

> In fact, without a global naming scheme, I cannot even reliably answer
> the following question for an arbitrary XML document (say, text/xml):
> 
>   "Is this an HTML document?"
> 
> The DOCTYPE declaration doesn't help at all here, as Eliot has
> repeatedly (and convincingly) pointed out -- DTDs are for
> guided-authoring and for validation, not for recognition.

It helps to the exactly the same degree that the namespace declaration
does. You aren't supposed to use the XHTML doctype on a document that
isn't HTML. That can't be checked entirely by any software short of a
full HTML validator but that's not the point: it's a societal/legal
declaration, not something computer-checkable.

That's exactly the same case with namespaces. There is no off-the-shelf
software that can check that a document "conforms" to the rules of its
namespace (if indeed there are any such rules). Unfortunatley, proper
use of either XHTML declaration must be enforced in courts, not
software.

 Paul Prescod

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.