cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volkm@r" <>
Subject Re: serialize without namespace
Date Thu, 29 Apr 2004 07:52:58 GMT
Joerg Heinicke wrote:
> [...]
>> How can I remove namespaces from my xml files?
>> The Cocoon FAQ say in:
>> <>
>> "... You could generalize this approach by using the serializer's
>> configuration method to declare namespaces to be excluded."
> [...]
>> What does the FAQ really mean?
> The section in the FAQ starts with "One approach is to extend your 
> serializer component and override the startPrefixMapping and 
> endPrefixMapping methods to do nothing." This means you subclass an 
> existing serializer. It's Java, not just configuring some options.

Thanks for clarification. Maybe a good reason for starting to learn Java.

> The second option "Another approach is to use an interim transformation 
> step in your pipeline with a stylesheet described here." is much easier, 
> only the link is no longer pointing to the correct anchor:

That is what I am presently using. And it's only task is to remove xmlns 
from *only* the root element in order to turn proper xhtml into proper html

   <map:match pattern="**.html">
     <map:generate src="cocoon:/{1}.xml"/>
     <map:transform src="remove-namespace.xsl"/>
     <map:serialize type="html"/>

and turn  <html xmlns=""> ... </html>

into      <html> ... </html>

Since html serializer already does some conversions - e.g. remove 
trailing slashes from empty elements - I expected this step to be done 
by it as well. So it looks to me as if I should try to work on the 


Topic "5.) OmitNsTransformer" of the latter sounds promising too.
Think I will check it first.

Thanks again for your attention!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message