W3C home > Mailing lists > Public > www-tag@w3.org > February 2005

Re: Trying to assess the depth of xml:id and c14n incompatibilities

From: Elliotte Harold <elharo@metalab.unc.edu>
Date: Mon, 14 Feb 2005 13:39:32 -0500
Message-ID: <4210F064.2040403@metalab.unc.edu>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: www-tag@w3.org

Bjoern Hoehrmann wrote:

> If there is any reason to inherit xml:space and xml:lang in the first
> place, you'd want to inherit new "inherited" xml:* attributes for the
> same reason; depending on how important it is to inherit those, this
> would require "updating" the algorithm whenever a new xml:* attribute
> appears. That's undesirable and inheriting some inherited attributes
> but not all of them is inconsistent, so inheriting xml:lang and xml:
> space but not others does not really seem a good solution to me.

The idea here was that if we have something like this:

<div xml:lang="fr" style="font-weight: bold">
   <h2 id="f1">C'est la vie</h2>
   <p id="f2">La vie est triste.</p>

Someone might wish to extract the h2 element or the p element, and not 
lose the information that this is in French. Ditto for xml:space. For 
xml:lang and xml:space this is indeed sensible, although it's a pain to 
implement. It also makes sense for xml:base, though there it turns out 
some unexpected interactions of various specs mean that naive 
inheritance doesn't work. Although I agree with the basic goal of 
maintaining base URIs in subsets, in practice it's more complicated than 
people expected. A realistic algorithm to do this correctly might 
require absolutization of URIs. I'm not sure about that, but the current 
algorithm certainly fails in some cases.

However, it was recognized at the time canonicalization was developed 
that attribute inheritance was inconsistent. For instance, it would also 
make sense to inherit the style attribute in the above example. However 
C14N does not do that. The inconsistency was noted at the time, and a 
deliberate decision was made to be inconsistent. Inconsistent treatment 
of different attributes is accepted.

I could swear somebody at the time did raise the issue of whether it 
made sense to inherit all xml: attributes (and I'm almost certain 
someone suggested inheriting no attributes) but it was four years ago, 
and I don't have the time right now to hunt through the archives and 
find out.

Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
Received on Monday, 14 February 2005 19:38:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:07 UTC