forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: How to view intermediate stages of Cocoon output?
Date Sat, 05 Apr 2003 08:42:53 GMT
On Fri, Apr 04, 2003 at 12:52:56PM -0500, Mark Montague wrote:
> 
> I'm trying to enhance a skin and it would be helpful to see the XML
> after site2book.xsl is applied to site.xml but before book2menu.xsl
> is applied.  Likewise for the XML resulting from the book2menu
> transform.

Easiest way is to put a <map:serializer type="xml"/> entry in whatever
pipeline you're interested in.

So assuming Forrest 0.4, you would:

 - Copy $FORREST_HOME/context/sitemap.xmap to your project's
   src/documentation/
 - Edit it and search for 'site2book.xsl', which you'll find in the
   'book' resource:

...
   201           <map:transform src="library/xslt/site2book.xsl" />
   202
   203           <map:call resource="skinit">
   204              <map:parameter name="type" value="book2menu" />
   205
   206              <map:parameter name="path" value="{path}" />
   207           </map:call>
   208        </map:resource>
...

So add a <map:serializer type="xml"/> after line 201.  Then you want to
find the pipeline which calls the 'book' resource, which is:

   271           <map:match pattern="**book-**.xml">
   272              <map:call resource="book">
   273                 <map:parameter name="dir" value="" />
   274
   275                 <map:parameter name="path" value="{2}.xml" />
   276              </map:call>
   277           </map:match>

So after doing a 'forrest run', you'd request
http://localhost:8888/book-index.xml to get the menu used for index.html

Same sort of thing for CVS Forrest, except the relevant snippets are in
navigation.xmap

--Jeff


Mime
View raw message