One problem with XHTML

Looks sensible, top to bottom.  What worries me is 3.1, list item 3:

 3.The root element of the document must designate one of three defined 
   namespaces by using the xmlns attribute [XMLNAMES]. The namespace 
   designated must match that of the DTD that the document purports to 
   validate against. The defined namespaces are:

     http://www.w3.org/Profiles/xhtml1-strict.dtd
     http://www.w3.org/Profiles/xhtml1-transitional.dtd
     http://www.w3.org/Profiles/xhtml1-frameset.dtd

This seems really unfortunate to me.  The #1 function of namespaces
is so that programmers can find the pieces of information they
need to process.  So suppose I'm writing a web-crawler, and I
am plowing through a variety of HTML and XML documents, following
<A> links.  What namespace should I check for?  I.e. in my crawler code, 
do I have to check 3 namespaces for every <A> element to see if 
it's an HTML <A> as opposed to some other <A>?  It seems to me that
for a large majority of elements, what programmers are going to
want to know is "is this HTML?".  So the costs of having multiple
namespaces for the same thing are obvious.  What I don't know is,
are there corresponding benefits?  -Tim

Received on Wednesday, 24 February 1999 15:05:23 UTC