Re: exc c14n bugs

On Tuesday 04 June 2002 12:03 pm, merlin wrote:
> 1) Bug in the Specification
>
> Consider the following document:
>   <A xmlns="http://example.org/">
>     <b:B xmlns:b="http://example.org/b" xmlns="">
>       <C xmlns="http://example.org/">
>     </b:B>
>   </A>

You're missing a clsoing "/" in C. I noted that because when I ran it 
through my code it complained of it, and once fixed output the intuitive 
result that you suggest:

> This is wrong (C is now in the wrong namespace). It should
> be rendered:
>   <A xmlns="http://example.org/">
>     <b:B xmlns:b="http://example.org/b">
>       <C></C>
>     </b:B>
>   </A>

So now we're presented with a situation in which many of us incorecctly 
read the speak to produce correct and intuitive results by the (false) 
assumption that 'xmlns=""' is processed like the namespace declarations.

> The following addition to the Specification would correct
> this:
>
> 4. If the token representing the default namespace is
>    not present in InclusiveNamespace.PrefixList, then
>    xmlns="" is rendered with a namespace axis iff:
>      1. The element E that owns the namespace axis is in the
>         node set, visibly utilizes the default namespace, and
>         has no default namespace node in the node set
>      2. The nearest output ancestor of E that visibly
>         utilizes the default namespace has a default namespace
>         node in the node set.

Step 3 is written as *any* of the subsequent conditions permit the 
namespace to be ignored. You are proposing an *any* too (I think, or is it 
*and*) for rendering, it'd be easier to understand if it was also written 
as an ignore. (It's an exception to c14n.) I'm thinking this because I'm 
wondering if we can address this issue by simply saying:

  A namespace node N (or the empty default namespace 
  declaration xmlns="") with a prefix (or default namespace token) 
  that does not appear in the InclusiveNamespacePrefix List is ignored 
  if any of the following conditions are met:

To rewrite 4 in light of that:
 4. If the default namespace declaration is present and the token 
representing the default namespace is not present in 
InclusiveNamespace.PrefixList, then it is ignored if any of the following 
conditions are met:
      1. The parent element E is not in the node set, 
      2.  The default namespace is not visibly utilized.
      2. The nearest output ancestor of E that visibly
         utilizes the default namespace has the same value.

So that's pretty close to the wording in 3. (If I did this correctly.) So 
it might be possible to say to include this in step 3 ...?

Received on Tuesday, 4 June 2002 15:26:04 UTC