W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2003

Re: namespace node implementation

From: james anderson <james.anderson@setf.de>
Date: Wed, 22 Oct 2003 12:13:01 +0200
To: www-ql@w3.org
Message-Id: <513009CC-0478-11D8-A8B0-000393BB8814@setf.de>


On Wednesday, Oct 22, 2003, at 09:15 Europe/Berlin, Per Bothner wrote:

>
> Michael Brundage wrote:
>
>> Even when the data model puts namespace nodes on an element,
>> you should only serialize them if necessary.  When an XML application
>> generates XML like
>> <a:x xmlns:a="foo">
>>   <a:y xmlns:a="foo">
>>     <a:z xmlns:a="foo">
>>       ...
>> you can be sure users won't use it for long.

which is no doubt why xml-c14n appeared in 2001, to be followed by 
xml-exc-c14n in 2002.

use cases do differ, but a default behaviour which alters the expressed 
document model is a bad idea. the necessity arises only because of 
problems introduced by the namespace axis and attempts to afford the 
namespace bindings indefinite extent. where there are no artifacts, 
there is no need to remove them.

the only mail i have ever gotten from a user on this topic was to the 
effect that they needed to be sure to be able to generate _exactly_ the 
nodes which were present in the document model. whatever they were. no 
more and no less. they were producing diffs on document models and the 
fidelity mattered.

>> That it is technically a correct serialization is completely
>> irrelevant -- namespace serialization carries a minimalist
>> aesthetic quality.  Serialize the least text required to
>> round-trip the data model.
>
> Yes.  I think we're in violent agreement.  I was making the same point 
> to James Anderson.
>
no, i suggest that the distinction is slightly different. to elide 
nodes when serializing based on the lexically apparent bindings is 
technically a trivial operation. this extends even to emitting 
qualified names in attribute text and, given declarations, to emitting 
qualified names in element content. to the best i could follow from the 
examples and the posted schematic algorithm, the proposal was to 
fabricate elevated namespace nodes as a side-effect of combination 
operations. i do not understand this to be entailed by any standards. 
as best i could follow, it is a combination of the xml-c14n and 
xml-exc-c14n algorithms. while it is possible to read xml-exc-c14n such 
that it implies this transformation, that interpretation is 
counterintuitive as it would render a document differently depending on 
whether the dependant reference was as a generic or attribute 
identifier. just another instance of the complexity introduced by the 
namespace axis.

...
Received on Wednesday, 22 October 2003 06:13:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC