cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Kavanagh <...@dotech.com>
Subject is this kosher?
Date Fri, 14 Mar 2003 01:16:17 GMT
I've written this HTTPTransformer which takes some simple XML containing 
link information (href, method) and returns either html (run through 
JTidy), xml (from the web server), or xml containing the location of the 
file that was downloaded (if type wasn't text/html* or text/xml*). Now, 
I'd like to be able to return the HTTP response code in a way that would 
let a selector decide what to do next.
Would it be taboo to add a parameter to those passed in via the setup() 
method on AbstractSAXTransformer? Would that parameter even become 
available, or is this one just a private copy?
I was thinking I'd also write a simple selector (like the 
ParameterSelector) which would take a list of strings to be tested (i.e. 
test="one|two|three|four"). That way, I can check for a bunch of return 
codes. The other option is to write a selector that understands some 
better expressions like test="param<500 && param >=400".
Please tell me if I'm barking up the wrong tree, or of someone has 
already implemented something like I'm talking about. I do have the 
HTTPTransformer working, I just need to address the return code issue. 
I'd prefer to have the sitemap define the action based on result code.

Thanks,
David


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


Mime
View raw message