cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: serialize without namespace
Date Wed, 28 Apr 2004 17:43:24 GMT
On 28.04.2004 16:49, Volkm@r wrote:

> How can I remove namespaces from my xml files?
> 
> The Cocoon FAQ say in:
> <http://cocoon.apache.org/2.1/faq/faq-serializers.html#faq-N1004C>
> 
> "... You could generalize this approach by using the serializer's
> configuration method to declare namespaces to be excluded."
> 
> But checking the serializer's documentation I couldn't find anything
> about this. I tried in the sitemap's serializer configuration with
> 
>    <exclude-namespaces>yes</exclude-namespaces>

This option is not available.

> and with
> 
>    <omit-namespace-declaration>yes</omit-namespace-declaration>

This option only removes the xml declaration.

> But none of them works.
> 
> 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.

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:

http://cocoon.apache.org/2.1/faq/faq-xslt.html#faq-N10075
http://wiki.cocoondev.org/Wiki.jsp?page=RemoveNamespaces

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message