cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Konovalov <>
Subject Breaking from the loop
Date Fri, 12 Aug 2005 12:19:55 GMT

I am trying to fix bug in Cocoon [2.0.4] app and XSL1.0.
XSSF transformer reads Excel XLS file and then we insert the
data intothe database table using SQLTransformer.
This particular date column is NOT nullable, so now it now
populates it with trunc(sysdate) if the data in XSL is in wrong
format or the cell is not of DATE type.

But that Date is extremely important to business, so what I am
trying to do is to break out of creating insert and show the
user an error message to fix XLS file.

I am inside the for-each loop (going through cells in row)
before building a query to be executed by  SQL transformer.
That row processing is triggered by apply-template.
I am trying to break out of the loop like:
using redirect to "my_url?error=1", and on that form I try to
handle that error but for some reason it's not redirecting.
<xsl:for-each select='$row/sht:Cell'> 
  <xsl:if test="not(@ValueType='DATE') and contains(sht:Name,

Also tried to populate that DB column with null to create SQL
and than put xsl handle-error block in the pipeline in XMAP,
but that still doesn't resirect to an error page.

Any suggestions ?

Thank you in advance,

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

View raw message