On Mon, Apr 02, 2001 at 03:50:25PM -0700, [EMAIL PROTECTED] wrote:
> 
> Actually, I believe there are three states to consider:
> 
> 1. Element is not in a namespace
> 2. Element is a namespace whose URI is a zero-length string

Dave,
 
 According to how I read the spec I believe that condition 2 is
not possible.  The spec states that 'If the URI reference in a default
namespace declaration is empty, then unprefixed elements in the scope
of the declaration are _NOT_ considered to be in any namespace.' (emphasis
is mine). So that element is not in a namespace. It's kind of a cart
before the horse arguement. The spec finishes section 5.2 with
'The default namespace can be set to an empty string. This has the same
effect, within the scope of the declaration, of there being no default
namespace.'  I believe the intent here was to make something like

<test xmlns:'ns:""'>
 <ns1>this is illegal since ns1 implies a default namespace and there is none</ns1>
 <ns:ns2>where this would be legal, and required</ns:ns2>
</test>


> 3. Element is in a namespace whose URI is a non-zero length string.
> 
> Clearly 3 is no problem, but 1 and 2 are a problem.  Believe it or not,
> this exact issue just come up in Xalan.  I think it implies that elements
> not in a namespace must a some sort of "null" value for their namespace
> URI, which is distinguishable from a zero-length string.
> 
> I'd be interested to hear other people's opinion on this.  Is it legal to
> have a zero-length namespace URI?  The parser seems to allow it.

I think it is legal, it just forces all elements to be required to have
a namespace.

edge

-- 
Brian Edginton                        
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to