> If the SAX spec says its on by default, I guess we should set it on by > default for *SAX* parsers, but not by default overall. The overhead of > doing namespaces is not trivial and those who don't use it shouldn't pay > for it. In fact, I find it questionable that the SAX spec makes any > statement about this and if it did it should have assumed that they are off > by default since that is by far the most likely desired setting for most > people at this time. A parser system should always default to simple, > stupid, and fast and only engage advanced functionality when its asked for.
Actually (did you see my later e-mail) the SAX spec does say that namespaces are on by default; the reasoning behind that is the large purpose of SAX 2.0 was to add namespace support. David (Megginson) would have almost surely gotten ripped had he done all the work to add in namespace support (which we've all been screaming for in xml-dev) and then not had it on by defualt. So I think Pier's bug fix is not only a good idea, but mandatory (although you certainly can choose to leave it off on DOM parsers and other spec implementations). Otherwise, Xerces loses major points in my book, and I'm sure many others - if it doesn't behave like SAX dictates, it really isn't of any use as a SAX parser. -Brett > > ---------------------------------------- > Dean Roddey > Software Weenie > IBM Center for Java Technology - Silicon Valley > [EMAIL PROTECTED] > > > > "Brett McLaughlin" <[EMAIL PROTECTED]> on 02/25/2000 08:53:40 > PM > > Please respond to [EMAIL PROTECTED] > > To: <[EMAIL PROTECTED]> > cc: > Subject: Re: SAX 2 and startElement() > > > > >From the SAX pages (http://www.megginson.com/SAX/SAX2: > <quote> > By default, an XML reader will report a Namespace URI and a local name for > every element, in both the start and end handler. Consider the following > example: > > <html:hr xmlns:html="http://www.w3.org/1999/xhtml"/> > > With the default SAX2 Namespace processing, the XML reader would report a > start and end element event with the Namespace URI > "http://www.w3.org/1999/xhtml" and the local name "hr". The XML reader > might > also report the original raw name "html:hr", but that parameter might > simply > be an empty string. > > </quote> > > and > > <quote> > > The "http://xml.org/features/namespaces" feature controls general Namespace > processing: when this feature is true (the default), ... > > </quote> > > This to me indicates that without setting the namespace feature to true, I > should get at least a local name on all elements. In other words, to add > the feature setting of namespace to true *should be* totally redundant; to > require it is a bug, as far as I can tell. > > Is anyone working on fixing this (yes, with namespace feature explicitly > set > to true, this works, but without it localName is never reported...)? Or do > you folks disagree and I'm missing something? > > > > -Brett > > > > > > -- > > -------------------------------------------------------------------- > > - P I E R - > > stable structure erected over water to allow the docking of seacraft > > <mailto:[EMAIL PROTECTED]> <http://www.betaversion.org/~pier/> > > -------------------------------------------------------------------- > > - ApacheCON Y2K: Come to the official Apache developers conference - > > -------------------- <http://www.apachecon.com> -------------------- > > > > > > > >