cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter van Hardenberg <>
Subject Cocoon exception handling.
Date Tue, 11 Oct 2005 06:16:22 GMT

I'm using a secondary data-driven XSLT to provide annotations for my document 
pages (thanks, Conal) but when the annotations are not present, it throws an 
exception which kills the pipeline. 

Now, I thought the best way to deal with that would be to handle the exception 
in the annotation pipeline, detect when the file is missing and simply return 
an ID transform instead of one that does something.

Unfortunately, I can't get it to work at all. I simply can't get the 
"identity.xslt" to ever get returned! I would be very appreciative of any 
advice you guys can give.

Thanks in advance,

Peter van Hardenberg
University of Victoria, Canada

<!--- bits of my sitemap follow -->
    <map:generators default="file">
      <map:generator name="exception" 
    <map:selectors default="browser">
      <map:selector name="exception" 
        <exception name="validation" 
        <exception name="not-found" 
        <exception name="missing-source" 
        <exception class="java.lang.Throwable" unroll="true"/>
      <map:action name="exception" 

   <!-- annotations stylesheet creation -->
    <map:match pattern="annotate/*"> 
	 <map:generate src="content/{1}_ann.xml"/>
         <map:transform type="xslt-saxon" 
         <map:serialize type="xml"/>
      <map:select type="exception">
        <map:when test="missing-source">
         <!-- in the event of an emergency (no annotations), just return the 
identity transform -->
 	 <map:generate src="style/identity.xslt"/>
 	 <map:serialize type="xml"/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message