Subject: [xsl] XSLT exception handling, HTTP/POST and more ... (update) From: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 05 Dec 2002 16:59:28 -0500 |
The exception and post:message extensions are available for server and client XSLTs. Some demos are included that show how ridiculously simple it is to call web services from XSLT.
I made no release yet, just CVS, but feel free to grab it through CVS. The code is actually usable, but the build and deployment process is still largely manual. If someone is insterested in helping with this code for the Xalan side of the world, please drop a note.
Michael Kay has noted that one problem of exception catching is: what do you do with the partially generated output tree? Well, I fixed this issue now: the xsl:try block buffers the generated tree and only outputs it when the ex:try block was successful. This works nicely for small try blocks now. But if the try block produces huge amounts of data (e.g., a batch of thousands of documents) it runs out of memory. So, I have added a switch to ex:try where you can say <ex:try atomic="no"> and then it will output directly. I do nest atomic try blocks in non-atomic ones when generating a node sequence, to be sure never to generate a parial node, but allow a sequence to be truncated in case of an exception. E.g.,
<ex:catch exception="java.lang.Throwable"> <exception msg="{ex:current-exception()}"> The node causing this exception was not output because it was incomplete! </exception> <ex:throw select="ne:new()" xmlns:ne="java:my.NodeError"/> <ex:catch>
<ex:catch exception="java.lang.Throwable"> <exception msg="{ex:current-exception()}"> The list was truncated because an exception occurred. </exception> <ex:catch>
regards, -Gunther
-- Gunther Schadow, M.D., Ph.D. gschadow@xxxxxxxxxxxxxxx Medical Information Scientist Regenstrief Institute for Health Care Adjunct Assistant Professor Indiana University School of Medicine tel:1(317)630-7960 http://aurora.regenstrief.org
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Dealing with breaking out, Chris Loschen | Thread | RE: [xsl] please help with date for, Jeff Beadle |
[xsl] Re: Key and/or grouping quest, Edward L. Knoll | Date | RE: [xsl] please help with date for, Jeff Beadle |
Month |