cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steffen Stundzig <stef...@smb-tec.com>
Subject [C2][Bug] ContentAggregator
Date Fri, 18 May 2001 09:23:31 GMT
Hi,

I've two pipelines with content aggregation:

  <map:match pattern="internal_error"> 
   <map:aggregate element="page" ns="http://de/page">
    <map:part src="_internal_error" element="content"/>
    <map:part src="_common_page" element="common" strip-root="true"/>
   </map:aggregate>
   <map:serialize/>
  </map:match> 

and 
  
  <map:match pattern="_common_page">
    <map:aggregate element="common" ns="http://de/common">
     <map:part src="_common_header" element="header"/>
     <map:part src="_common_menu" element="menu"/>     
     <map:part src="_common_footer" element="footer"/>
    </map:aggregate>
   </map:match>

To avoid nested 'common' elements as aggregation results, I use the 
strip-root attribute which removes one 'common' element.
The result of this transformation is:

<page xmlns="http://de/page">
 <content xmlns="http://de/page">
  <page>
   <title>This is the internal error page!</title>
  </page>
 </content>
 <common xmlns="http://de/page">
  <header xmlns="http://de/common" xmlns="http://de/common">
   <page>
    <title>This is the header page!</title>
   </page>
  </header>
  <menu xmlns="http://de/common">
   <page>
    <title>This is the administrator menu page!</title>
   </page>
  </menu>
  <footer xmlns="http://de/common">
   <page>
    <title>This is the footer page!</title>
   </page>
  </footer>
 </common>
</page>

The problem is in element page/common/header. This element contains
the namespace declaration of the removed(stripped) 'common' element twice.
This is not valid XML. And only one declaration seems to be enough. :-)

Any ideas on howto fix it?


Regards
	Steffen...


-- 
______________________________________________________________________
Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




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


Mime
View raw message