You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by David Brownell <da...@pacbell.net> on 2002/05/31 18:14:00 UTC

Re: [Sax-devel] Re: SAX survey: expected local name for non-namespace qualified elements

>> And
>> moreover, I'd certainly _prefer_ that elements not in any namespace
>> still have a localName (regardless of the namespace setting)
>
> 
> What is the localName in "foo:bar" and "foo:bar:foo" which are legal 
> element names in XML 1.0 and should therefore be passed through when 
> namespaces are off?

I'd expect that localName would still be defined to be the syntactic
"strip off the only prefix" transform of qName that it is in other
cases ... so "foo:bar" would become "bar", and "foo:bar:foo" would
be an error (normally reported as an empty localName).

- dave





---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: [Sax-devel] Consensus? expected local name for non-namespace qualified elements

Posted by Karl Waclawek <ka...@waclawek.net>.
> on what happens when namespace processing is turned *on*. In 
> particular, I am prepared to offer the following tentative consensus:
> 
> When the feature http://xml.org/sax/features/namespaces has the value 
> true (as it does by default), SAX 2.0 parsers *must* report a 
> non-empty local name for all elements and attributes, whether 
> namespace qualified or not. A parser that reports the local name as 
> the empty string when http://xml.org/sax/features/namespaces is true 
> is simply not compliant with the SAX 2.0 specification.
> 
> Does anyone want to stick their hand up and disagree with this statement?

OK, I agree.

It's not enough, though.

Karl



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Consensus? expected local name for non-namespace qualified elements

Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
I've just returned from Kentucky and read through the messages of the 
last few days. There's clearly a significant amount of disagreement 
on what does and what should happen when namespace processing is 
turned *off*. However, there seems to be nearly unanimous agreement 
on what happens when namespace processing is turned *on*. In 
particular, I am prepared to offer the following tentative consensus:

When the feature http://xml.org/sax/features/namespaces has the value 
true (as it does by default), SAX 2.0 parsers *must* report a 
non-empty local name for all elements and attributes, whether 
namespace qualified or not. A parser that reports the local name as 
the empty string when http://xml.org/sax/features/namespaces is true 
is simply not compliant with the SAX 2.0 specification.

Does anyone want to stick their hand up and disagree with this statement?
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: [Sax-devel] Re: SAX survey: expected local name for non-namespace qualified elements

Posted by Robin Berjon <ro...@knowscape.com>.
On Friday 31 May 2002 18:14, David Brownell wrote:
> > What is the localName in "foo:bar" and "foo:bar:foo" which are legal
> > element names in XML 1.0 and should therefore be passed through when
> > namespaces are off?
>
> I'd expect that localName would still be defined to be the syntactic
> "strip off the only prefix" transform of qName that it is in other
> cases ... so "foo:bar" would become "bar", and "foo:bar:foo" would
> be an error (normally reported as an empty localName).

I don't think that makes much sense... If namespaces are off, then there is 
no such thing as a prefix to be stripped off. And raising an error for the 
latter would be a strange decision knowing that it's a legal name when 
namespaces are off.

-- 
Robin Berjon <ro...@knowscape.com> -- for hire: http://robin.berjon.com/
  Avoid clichés like the plague.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org