cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Cleaning up unused namespace declaration
Date Mon, 09 Feb 2004 17:52:57 GMT
Geoff Howard wrote:

> Stefano Mazzocchi wrote:
>
>> On 9 Feb 2004, at 04:40, Sylvain Wallez wrote:
>
>>> A long time ago, I wrote a NamespaceNormalizer that works in two steps:
>>> 1 - record all SAX events (using XMLByteStreamCompiler) except 
>>> namespace declarations which are stored separately,
>>> 2 - replay SAX events, declaring all namespaces before the root 
>>> element.
>>>
>>> This leads to buffering the document, which has a cost, but wouldn't 
>>> hurt when the pipeline can be cached.
>>>
>>> We could add this as an optional feature of the XMLSerializer.
>>>
>>> WDYT?
>>
>>
>> I think it would *rock*! I wouldn't mind paying the cost of such a 
>> buffering since I'm going to cache this anyway.
>
>
> Couldn't you also configure it to remove all ns without checking if 
> you know your output should have no other namespaces (as usually the 
> case with xhtml)?  That way you could avoid buffering in that special 
> but common case.


We can filter out all namespaces in HTML, but not in XHTML, as we can 
have composite documents with foreing markup.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message