cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Busch" <Andreas.Bu...@ilogics.de>
Subject RE: setting StatusCode
Date Wed, 13 Dec 2006 10:19:00 GMT
Hi Jeroen,

I have looked on errorhandling in sitemap , but  my missing link is how to raise an Exception
in a XSLT transformer 

Here a sample sitemap 

<map:match pattern="inbound_A_COND01">
			<map:generate type="stream">
    		<map:parameter name="defaultContentType" value="text/xml"/>
  			</map:generate>
	 	     <map:transform type="xsltc" src="stylesheet/cond_a01.xsl"/>
				 <map:transform type="sql">
					<map:parameter name="use-connection" value="WAWI_INTERFACES" />
				</map:transform>
________________  Here should be another transformer etc to read any <sql:error> and
if exists change the server Status 

		    
			<map:serialize type="xml" />
			</map:match> 


Thanks a lot 

Andreas Busch
ILOGICS GmbH ∙ Berduxstr. 22 ∙ D-81245 München
Andreas.Busch@ilogics.de
Tel: +49 89 896667-0
Fax: +49 89 896667-29
www.ilogics.de

-----Original Message-----
From: Jeroen Reijn [mailto:j.reijn@hippo.nl] 
Sent: Wednesday, December 13, 2006 11:02 AM
To: users@cocoon.apache.org
Subject: Re: setting StatusCode

Hi Andreas,

you can do this with the help of some sitemap error handling.
You can do exactly that by catching your exception and then throw the status code.

See http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html
for more information.

Be sure to also check out the error handling core samples of the Cocoon distribution.

Kind regards,

Jeroen Reijn

Andreas Busch wrote:
> Hi ,
> im thinking about the following requirements
>  
> I get a XML-Dokument postet in, transform it and use the SQL Transformer.
> If there will be anny error I have to return a Servercode like 404 or 
> 304
>  
> I can set the servercode in the serializer, (<map:serialize type="xml" 
> status-code="304" />)
>  
> but how to make it variable ? can I evaluate th saxstream to set a 
> variable or are there a inputmodule
>  
> any hints are welcome
>  
> Thanks in advance !
>  
> *Andreas Busch*
> ILOGICS GmbH · Berduxstr. 22 · D-81245 München 
> Andreas.Busch@ilogics.de <mailto:Andreas.Busch@ilogics.de>
> Tel: +49 89 896667-0
> Fax: +49 89 896667-29
> www.ilogics.de <http://www.ilogics.de/>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message