<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Thanks Jay.<br><br>I thought of that solution too when I had a look at Catalyst::Plugin::Static::Simple. But in this case, my doubt was, and is, how should I create the view through the helper?<br>Most of the examples for creating views are TT views, so they create it as 'script/hello_create.pl view my_TT_view TT'.<div>&nbsp;</div>David<div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">De:</span></b> J. Shirley &lt;jshirley@gmail.com&gt;<br><b><span style="font-weight: bold;">Para:</span></b> The elegant MVC web framework &lt;catalyst@lists.scsys.co.uk&gt;<br><b><span style="font-weight:
 bold;">Enviado:</span></b> vie,5 marzo, 2010 16:45<br><b><span style="font-weight: bold;">Asunto:</span></b> Re: [Catalyst] Best practices: XML output from static XML<br></font><br>On Fri, Mar 5, 2010 at 5:10 AM, David &lt;<a ymailto="mailto:oldskiffle@yahoo.es" href="mailto:oldskiffle@yahoo.es">oldskiffle@yahoo.es</a>&gt; wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I need to generate an XML output (Content-type: application/xml), but this<br>&gt; XML output is the XML content which is stored in an XML file. I don't need<br>&gt; to dinamically generate this XML content.<br>&gt; I have searched in google but I don't find any catalyst view module for<br>&gt; managing this case. I don't know if exists any module for generating XML<br>&gt; output from a static file as, for example, Catalyst::View::XSLT module<br>&gt; (<a href="http://search.cpan.org/%7Ejanus/Catalyst-View-XSLT-0.08/lib/Catalyst/View/XSLT.pm"
 target="_blank">http://search.cpan.org/~janus/Catalyst-View-XSLT-0.08/lib/Catalyst/View/XSLT.pm</a>)<br>&gt; does. That is, generate an output from a static file, in this case, an XML<br>&gt; output.<br>&gt;<br>&gt; I am not finding much information about designing your own views in<br>&gt; Catalyst, or at least, I don't see much flexibility. All examples I have<br>&gt; found need to be generated, through the helper view, with TT template or any<br>&gt; other templates.<br>&gt; Is it possible to create your own view, with no template, and for example,<br>&gt; in my case, read the output from a static file and send this output to the<br>&gt; client? (I don't know exactly how Views works in Catalyst, though I have<br>&gt; already read Catalyst tutorial and cookbook)<br>&gt;<br>&gt; Thanks in advanced,<br>&gt;<br>&gt;<br>&gt; David<br>&gt;<br><br><br>Well, you could do your own view or just rely on<br>Catalyst::Plugin::Static::Simple:<br><br><a
 href="http://search.cpan.org/%7Emstrout/Catalyst-Plugin-Static-Simple-0.29/lib/Catalyst/Plugin/Static/Simple.pm#serve_static_file_$file_path" target="_blank">http://search.cpan.org/~mstrout/Catalyst-Plugin-Static-Simple-0.29/lib/Catalyst/Plugin/Static/Simple.pm#serve_static_file_$file_path</a><br><br>You could wrap this in a view:<br><br>package MyApp::View::StaticFile;<br><br>use parent 'Catalyst::View';<br><br>sub process {<br>&nbsp; &nbsp; my ( $self, $c ) = @_;<br>&nbsp; &nbsp; $c-&gt;serve_static_file( $c-&gt;stash-&gt;{static_file} );<br>}<br><br>1;<br><br><br><br>Then just do $c-&gt;forward( $c-&gt;view('StaticFile') ); after setting the stash key.<br><br>-Jay<br><br>_______________________________________________<br>List: <a ymailto="mailto:Catalyst@lists.scsys.co.uk" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst"
 target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br></div></div>
</div><br>



      </body></html>