cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Alexnat <tho...@alexnat.de>
Subject Issue with cocoon views -- Bug or correct Design?
Date Tue, 07 Dec 2004 19:45:38 GMT
Dear Developers,

I was asking in the cocoon user mailing list why my content is not 
being transformed correctly, when using the cocoon default pretty-print 
view. The answers so far pointed me to the developer list, because 
there seems to be a misbehaviour or misunderstanding in using the 
cocoon views concept.


P R O B L E M
-------------
When calling a simple aggregated xml with the standard cocoon pretty 
print view, it seems that cocoon calls the view transformer twice and 
scrambles totally the output.

http://localhost:8888/a?cocoon-view=pretty-content (works fine)
http://localhost:8888/b?cocoon-view=pretty-content (scrambles xml tree, 
calls the view xslt twice!)


Q U E S T I O N
---------------
How can I correctly get a view of the "b" matcher, by not scrambling 
the previous included content from "a". Defining a seperate label for 
each matcher does not seem to be a good and generic solution.


C O D E
-------

-- test.xml --
<test>
    Hello World XML
</text>


-- sitemap.xmap -- (added to the original sitemap)
<map:pipeline>
     <map:match pattern="a">
         <map:generate src="test.xml"/>
         <map:serialize/>
     </map:match>
</map:pipeline>
<map:pipeline>
   <map:match pattern="b">
         <map:generate src="cocoon:/a" />
         <map:serialize/>
   </map:match>
</map:pipeline>


S Y S T E M
-----------
Mac OS X 10.3.6 with Cocoon 2.1.6, Dual G5, Java 1.4.2_05

Best regards and any help wanted,
    Thomas


Mime
View raw message