You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by st...@outerthought.org on 2004/01/12 18:00:04 UTC
[WIKI-UPDATE] RemoveNamespaces Mon Jan 12 18:00:03 2004
Page: http://wiki.cocoondev.org/Wiki.jsp?page=RemoveNamespaces , version: 14 on Mon Jan 12 16:39:13 2004 by 217.11.233.241
- You may also use attached OmitNsTransformer -- simple SAX event based transformes. This transformer omit just the {{xmlns:xyz}} declarations. It can omit all or few of them using special parameter {{omit-namespaces}}.
? - ^
+ You may also use attached OmitNsTransformer - simple SAX event based transformer. This transformer omit just the {{xmlns:xyz}} declarations. It can omit all or few of them using special parameter {{omit-namespaces}}. Example included in javadoc comments. Brief excerpt from sitemap:
? ^ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Declare {{omitns}} as {{map:transformer}} component:
+ {{{
+ <map:components>
+ ...
+ <map:transformes>
+ ...
+ <map:transformer
+ logger="sitemap.transformer.omitns"
+ name="omitns"
+ pool-grow="2" pool-max="16" pool-min="2"
+ src="com.gitus.cocoon.transform.OmitNsTransformer"/>
+ </map:transformer>
+ ...
+ }}}
+ Add transformer into pipeline:
+ {{{
+ <map:match pattern="*_xsp">
+ <map:generate type="serverpages" src="xsp/{1}.xsp"/>
+ <map:transform type="omitns" label="xml">
+ <map:parameter name="omit-namespaces" value="xsp jpath xspdoc esql xsp-request"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+ }}}
+