[...]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."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"/>
</map:match>and turn <html xmlns="http://www.w3.org/1999/xhtml"> ... </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 serializer.
http://cocoon.apache.org/2.1/faq/faq-xslt.html#faq-N10075 http://wiki.cocoondev.org/Wiki.jsp?page=RemoveNamespaces
Topic "5.) OmitNsTransformer" of the latter sounds promising too. Think I will check it first.
Thanks again for your attention! -- [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
