Re: SAX and xmlns (again)

Elliotte Rusty Harold <[email protected]>
Newsgroups gmane.text.xml.sax.devel
Message-ID <p04330100ba28e8611c49@[192.168.254.4]>
At 12:16 PM +0100 12/20/02, Robin Berjon wrote:

>However I do not believe that such political decisions should 
>influence SAX. SAX is there to help people get the job done. I don't 
>think it's up to you, me, the SAX project, or whoever to dictate 
>such choices. PerlSAX2 and it's companion XML::NamespaceSupport have 
>an option to switch between both behaviours. Users use it. They get 
>their jobs done more easily. They're happier that way. So can't we 
>forget about what's right and do what's best?

What is best for SAX users is to maintain backwards compatibility 
with the namespaces spec and previous iterations of SAX2. That is 
what SAX does. The simple fact is it really doesn't matter whether 
the namespaces spec puts the xmlns prefix in some namespace or no 
namespace at all. Either decision would have been acceptable when 
namespaces and SAX2 were released. At that time, the core group chose 
to say that these attributes are not in any namespace. Fine. It 
wouldn't have  made any difference if they had put the xmlns prefix 
in a namespace. That would have been fine too.

However, changing the decision midstream is an interoperability 
disaster. SAX has wisely chosen not to go along with the core group's 
waffling. Thus a SAX program written to the old behavior still works 
today. Nothing would be gained by changing this now. It would not 
allow developers to write one single program they can't write today. 
It's a coin toss. There isn't a strong reason to prefer one solution 
over the other, but there is a very good reason to prefer sticking to 
the decision once the decision was made. That's what SAX is doing.

For those users who really, really want to put the xmlns prefix in a 
namespace (though for the life of me I can't imagine why, maybe it 
makes it marginally easier to feed SAX events into a DOM tree or some 
such) then SAX 2.0.1 includes a feature that can be turned on to use 
the namespace URI specified in the errata. However, this is wisely 
false by default.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | [email protected] | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+


-------------------------------------------------------
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
_______________________________________________
List: sax-devel, [email protected]
See:  http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.