cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janet Yvan <>
Subject Sitemap catching exceptions
Date Tue, 19 Jul 2005 09:53:17 GMT
Hi all.


In my webapp, I have to deal with externally generated data. These data are
not every time valid XML, so I need to catch parsing exceptions and then to
continue generating my page. So I designed a special pipeline which was
meant to handle parse errors. When I directly call the pipeline, the errors
are caught and an empty page is generated. But when I try to load the whole
page, it sends me a parse error … I don’t understand why …


Thanks in advance.



Here are some pieces of my sitemap :


<!—Pipeline which retrieves external data -->

<map:pipeline type="noncaching">

      <map:match pattern="**/annonces.drfmc">


            <map:serialize type="xml"/>



      <map:match pattern="**/annonces.ext.xml">

            <map:aggregate element="seminaires">

                  <map:part src="cocoon:/{1}/annonces.drfmc"/>

                  <map:part src="cocoon:/{1}/annonces.drecam"/>

                  <map:part src="cocoon:/{1}/annonces.dapnia"/>


            <map:serialize type="xml"/>




                  <map:select type="exception">

                        <map:when test="document-does-not-exist">


                        <map:serialize type="xml"/>




                        <map:serialize type="xml"/>







<map:match pattern="**/annonces.html">

            <map:aggregate element="cmsbody" label="src">

                  <map:part src="cocoon:/{1}/mymenu.xml"/>       

                  <map:part src="cocoon:/{1}/annonces.ext.xml"/>

                  <map:part src="cocoon:/{1}/annonces.xml"/>


            <map:transform src="./xslt/annonce2xhtml.xsl" label="toto">

                  <map:parameter name="use-request-parameters"

                  <map:parameter name="root" value="/dsm/live"/>


            <map:serialize type="xhtml"/>



View raw message