[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Return Error Code Based on Pipeline Content
From:       Daniel Curran <daniel.curran () dotech ! com>
Date:       2006-04-10 2:51:50
Message-ID: 4439C846.9030607 () dotech ! com
[Download RAW message or body]

Is it possible to return an error code based on the content in the pipeline?

What I have currently is something similar to the following -

<map:match="put-request">
<map:generate type="request"/>
<map:transform src="setupSqlQuery.xsl"/>
<map:transform type="sql"/>
<map:transform src="transformSqlResults.xsl"/>
<map:serialize type="xml"/>
</map:match>

What I would like to be able to do is examine the content of the sql 
transform and determine a success or failure of the operation. Based on 
this result I would like to be able to send an error.

If the operation was completed successfully I would like to send a 200 
status code, where as a failure might return a 500.

I originally thought that something like a selector where I could set 
the status code of the serialization, but selectors do not have access 
to the content of the pipeline.

What would be the best way to handle this type of logic. Is it possible 
in the sitemap? or should I look for a solution elsewhere?

Thanks,
Dan


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic