Hi !

        I'd like to handle several kinds of errors, differently if possible ;
on my site, the pipeline serves mainly ".html" pages using the XML files
which have the same filename but with the ".xml" extension. More
precisely, if the file xxx.html is requested, I aggregate xxx.xml and
site.xml, which is a file which contains infos about navbars, page
titles... for the whole site (I need it to create the navbars, the
titles...) and then, I use an XSL transformation and I serialize in
HTML. Anyway, here are the different kinds of error I'd like to handle :

- the requested file has not the ".html" extension
  using something like :

   <map:handle-errors type="404"> 
    <map:transform src="stylesheets/skeletons/error2html.xsl"/>
    <map:serialize status-code="404"/>
   </map:handle-errors>

  should work (by the way, was is the purpose of status-code="404" ?)

- the xxx.xml file does not exist
  In this cas, I've got half of my content (I've got site.xml)
  is there a way to tell cocoon to handle this error ?
  I've found that the error message is displayed only if I use
map:handle-errors type="404"
  with map:serialize status-code="404"...

- the xxx.xml file is invalid
  In this cas, I've got also half of my content (I've got site.xml)
  is there a way to tell cocoon to handle this error ?
  I've found that depending on what I put in map:handle-errors, cocoon
displays an "internal
  server error" or uses my error2html.xsl to write something like "error
creating resource"

Thanks to my "site.xml" file, I check if the requested page is in the
list of "declared" pages of my site (some pages share the same content,
and in this case, I don't aggregate xxx.xml to site.xml, I choose
another xml file). I would like to be able to redirect the user to an
error 404 page in this case ; is it possible to do it without using XSP
?

So, I'd like to have more precisions about how errors can be handled and
how "fire" errors during an XSL transformation (or anything similar).

Thanks.

-- 
°v° Sylvain Fétiveau   Tel. (613) 731-4046
/ \ Webmotion Inc.     http://www.webmotion.com
" " mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to