cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Best Practices for Debugging XML?
Date Wed, 21 Apr 2004 10:13:16 GMT

Just  use cocoon-view !

Define a view  like this.


 <map:view from-label="aftergenerator" name="aftergenerator">
      <map:serialize type="xml" />
    <map:view from-label="afterwoody" name="afterwoody">
      <map:serialize type="xml" />
    <map:view from-label="aftertemplate" name="aftertemplate">
      <map:serialize  />
    <map:view from-label="afterstyle" name="afterstyle">
      <map:serialize type="text" />
    <map:view from-label="afteri18n" name="afteri18n">
      <map:serialize type="xml" />

And in your pipeline in the different elements call them 

<map:generate    src=
label="aftergenerator" />
       <map:transform type="woody" label="afterwoody" />
       <!-- REALLY IMPORTANT : You have to translate the woody field, 
validation HERE else this is lost -->
       <map:transform type="translator"  label="afteri18n , search, print" 
                 <map:parameter name="locale" value="{locale}" />
       <map:transform  src="context://stylesheets/woody-main-styling.xsl" 
        <map:serialize />

Hope it can help


David Swearingen <>
21/04/2004 04:20
Please respond to users
        Subject:        Best Practices for Debugging XML?

Newbie question: what's the best way to view raw xml when debugging 
pipelines for web development?  I think my question comes down to these 
two points:
1) Should serializers be switched to type="xml" so that I can see raw xml 
results in a browser?
2) If so, or, in general, are there some good techniques to allow me to 
debug without having to change some portion of the sitemap each time, 
i.e., a way to configure the sitemap so that when I request foo.xml 
instead of foo.html, I see the raw xml instead? 

View raw message