Stephan Michels wrote:
Am Do, den 22.01.2004 schrieb Nicola Ken Barozzi um 16:45:

...
It goes through handle-errors, and the error selector actually selects "syntax", but then the 'exception' generator outputs nothing.

Any idea, something I can check?

The FlowSript redirects to the internal pipeline, which havn't the handle-errors section. If you combine the pipelines, and exclude the internal-only attribute, then it should work.

Wait a sec, I don't get it yet.


I have removed the internal-only attribute, but I had to do it anyway to see a page. I have no problem in seeing pages that are ok.

The problem comes with pages that have errors, that must be treated in handle-errors.

I guess that the problem is a bit wider than chaperon.

I have this:

 <map:pipeline>
      <map:match pattern="**.xml">

        <map:select type="exists">
          <map:when test="{project:content.xdocs}{1}.ihtml">
            ...
          </map:when>

          <map:when test="{project:content.xdocs}{1}.cwiki">
            <map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
              <map:generate type="text2xml"
                   src="{project:content.xdocs}{1}{2}.cwiki" />

<map:transform type="lexer" src="cocoon:/wiki.xlex"/>
<map:transform type="parser" src="cocoon:/wiki.xgrm"/>
<!--
<map:transform src="{forrest:home}/context/resources/chaperon/stylesheets/error4wiki.xsl"/>
<map:transform type="lexer" src="{forrest:home}/context/resources/chaperon/grammars/error.xlex"/>
<map:transform src="{forrest:home}/context/resources/chaperon/stylesheets/error2page.xsl"/>
-->
<map:transform
src="{forrest:home}/context/resources/chaperon/stylesheets/wiki2xdoc.xsl">
<map:parameter name="name" value="{2}" />
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
</map:when>


          <map:when test="{project:content.xdocs}{1}.txt">
            ...
          </map:when>

          <map:when test="{project:content.xdocs}{1}.sxw">
            ...
          </map:when>

          <map:otherwise>
            ...
          </map:otherwise>

</map:select>

</map:match>

<map:handle-errors>
<map:select type="exception">
<map:when test="syntax">
<map:generate type="exception"/>
<map:transform src="{forrest:home}/context/resources/chaperon/stylesheets/text4error.xsl"/>
<map:transform type="xinclude"/>
<map:transform type="lexer" src="{forrest:home}/context/resources/chaperon/grammars/error.xlex"/>
<map:transform src="{forrest:home}/context/resources/chaperon/stylesheets/error2html.xsl">
<map:parameter name="contextPath" value="{request:contextPath}"/>
</map:transform>
<map:serialize type="html"/>
</map:when>
<map:otherwise>
<map:generate type="notifier"/>
<map:serialize type="xml"/>
</map:otherwise>
</map:select>
</map:handle-errors>
</map:pipeline>


Guess what, handle-errors does *not* get called and it delegates to the main sitemap. Note that this file is used in a aggregation.

Anyway, I move the handle-errors in the main sitemap, and there it gets called. It even selects the <map:when test="syntax">, because if I put in there a simple notifier I get the report.

But putting in there even only

     <map:generate  type="exception"/>
     <map:serialize type="xml"/>

gives me an empty output.

Wierd, I dunno where to look.

--
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Reply via email to