"OnError"-style pipelines
Assuming a pipeline as in the example below: ... ... ... ... Is there a straightforward way to implement some sort of "On Error" clause in the pipeline above, so that if there is any specific condition set by any of the actions, the subsequent actions/transformers are simply bypassed and a final action/transformer is executed? I understand Cocoon has a "handles-errors" tag that handles certain types of pipeline errors (a requested pipeline is not found, a stylesheet is missing, a resource is not found, etc...). These have to do with mistakes in the configuration of the pipeline. But I am considering application-specific conditions, for which the "handles-errors" does not seem to be appropriate. I guess I could add lots of selectors to the example above, but one could easily imagine how cluttered it would become. Any ideas? Thanks, jlerm
Re: esql not working at all, no connection ever created!
Perhaps this message is inappropriate for this mailing list, but what I want to say is that I wonder why people would participate without showing their real names, but instead conceal their identity by means of fake yahoo or hotmail addresses. I joined recently, so maybe this has always been a common practice anyway. I think there are occasions when concealing the identity is appropriate, but this mailing list is composed of frank, honest and motivated individuals that give their best to advance technology. In my opinion, not showing the real name is a lack of respect to the rest of the participants, especially those that have consistently given their best. Again, sorry for this e-mail not being about Cocoon... Thanks for your attention. Julio Lerm (Yes, that's my real name, and I am not ashamed or affraid of showing it...) - Original Message - From: Not Available To: [EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 12:28 PM Subject: Re: esql not working at all, no connection ever created! Here is my xsp code: http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2"> db_pool select * from antiques Here is my web.xml: load-class org.hsqldb.jdbcDriver com.mysql.jdbc.Driver Here is my cocoon.config: jdbc:mysql://localhost/databasename?autoReconnect=true myusername mypassword Here is my pipeline for testing: Thanks again Christopher Painter-Wakefield <[EMAIL PROTECTED]> wrote: Please post your xsp code, or at least the portion with esql in it. Veryhard to help, otherwise.-Christopher|-+>| | Not Available || | <[EMAIL PROTECTED]|| | hoo.com> || | || | 04/01/2003 03:47 || | AM || | Please respond to|| | cocoon-users || | ||-+>>--|| || To: [EMAIL PROTECTED] || cc: || Subject: esql not working at all, no connection ever created! |>--|I have been trying to get esql to work now for about 3 days with no luck. Ibeleive i have configured everything correctly but when I run any xsp pagewith esql it returns a duplicated page of my xsp page except that it stopsat the esql:connection tag. When I look at the error log it says there wasa null pointer exception. After examining the generated java file I thinkit is because a connection object is always null (never set to a validconnection). However I am pretty confident my pool is set up correctly andthe drivers are being loaded ok.Here is the code that it points to in the java file:_esql_query = new EsqlQuery( _esql_connection, String.valueOf(""+ " select * from antiques "+ " ") );No where above this code is the _esql_connection every initialized with aconnection.I am using the latest release for java 1.4.1 and running windows me withmysql.Thanks,Kris-To unsubscribe, e-mail: [EMAIL PROTECTED] pache.or gFor additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!?Yahoo! Tax Center - File online, calculators, forms, and more
Re: Shipping compiled translets rather than XSL files in plain text format
Taking a look at XSLTC-related source files, it appears that there is a limitation on XSLTC's side in terms of requiring a DOM object as argument to the method "transform" of class org.apache.xalan.xsltc.Translet. This is the Translet interface definition: package org.apache.xalan.xsltc; public interface Translet { public void transform(DOM document, TransletOutputHandler handler) throws TransletException; public void transform(DOM document, TransletOutputHandler[] handlers) throws TransletException; public void transform(DOM document, NodeIterator iterator, TransletOutputHandler handler) throws TransletException; public Object addParameter(String name, Object value); public void buildKeys(DOM document, NodeIterator iterator, TransletOutputHandler handler, int root) throws TransletException; public void addAuxiliaryClass(Class auxClass); public Class getAuxiliaryClass(String className); public String[] getNamesArray(); public String[] getNamespaceArray(); } The fact that a DOM object is required limits its applicability to the Cocoon framework, since one of the biggest strengths of Cocoon is the SAX-based processing. In order to take advantage of a Translet in a Cocoon pipeline, a sitemap component would then have to first build a DOM tree from the stream of SAX events and then invoke the translet. Looks feasible, but a Translet should be able to handle SAX events, in addition to a DOM document anyway. Then I guess there are two ways of moving ahead. Please correct me if I'm wrong: 1) Have XSLTC's Translet implementation changed, so it is able to deal with SAX-based processing; 2) Cocoon provides a way of compiling, or at least serializing the stylesheets. This compiled or serialized image of the pipeline transformations could then be deployed at customer sites. This would then mean Cocoon would be doing similar to XSLTC, but then comes the question to Cocoon's developers: what is the feasibility? Thanks, Julio - Original Message - From: "Geoff Howard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 6:42 AM Subject: RE: Shipping compiled translets rather than XSL files in plain text format > A great question I'd be interested in. I've not heard anyone doing this, so > if you > don't get an answer you'll need to dig into it yourself. The first thing > I'd try is > to see how xsltc (I assume you're using that) handles precomiled > stylesheets. What > does it expect as its source? A classname? It may be as simple as setting > up > cocoon to use xsltc (see archives and wiki) and passing the classname in the > src > attribute of the transformer. > > Please report back what you find and I (or others) can help evaluate what > internal > changes would be necessary to accomodate this if it doesn't just work > automagically. > > Are you using 2.1dev or 2.0.4? > > Geoff Howard > > -Original Message- > From: jcplerm [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 29, 2003 11:02 PM > To: [EMAIL PROTECTED] > Subject: Shipping compiled translets rather than XSL files in plain text > format > > > Is it possible to deploy Cocoon applications at customer sites just by > installing compiled versions of XSL stylesheets (translets) rather than > supplying them in plain text format? > > Thanks, > > Julio Lerm > Chicago, IL > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shipping compiled translets rather than XSL files in plain text format
Thanks for your reply. Although it's low in my priority list, I'll let you know the result of my own investigation. Julio - Original Message - From: "Geoff Howard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 6:42 AM Subject: RE: Shipping compiled translets rather than XSL files in plain text format > A great question I'd be interested in. I've not heard anyone doing this, so > if you > don't get an answer you'll need to dig into it yourself. The first thing > I'd try is > to see how xsltc (I assume you're using that) handles precomiled > stylesheets. What > does it expect as its source? A classname? It may be as simple as setting > up > cocoon to use xsltc (see archives and wiki) and passing the classname in the > src > attribute of the transformer. > > Please report back what you find and I (or others) can help evaluate what > internal > changes would be necessary to accomodate this if it doesn't just work > automagically. > > Are you using 2.1dev or 2.0.4? > > Geoff Howard > > -Original Message- > From: jcplerm [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 29, 2003 11:02 PM > To: [EMAIL PROTECTED] > Subject: Shipping compiled translets rather than XSL files in plain text > format > > > Is it possible to deploy Cocoon applications at customer sites just by > installing compiled versions of XSL stylesheets (translets) rather than > supplying them in plain text format? > > Thanks, > > Julio Lerm > Chicago, IL > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Shipping compiled translets rather than XSL files in plain text format
Is it possible to deploy Cocoon applications at customer sites just by installing compiled versions of XSL stylesheets (translets) rather than supplying them in plain text format? Thanks, Julio Lerm Chicago, IL
Re: Non-string sitemap custom parameters
Thanks for your reply. What happens is that I want to access another object from within XSLT by means of Xalan extensions. That object should have access to the request/session objects. I think one way would be to subclass TraxTransformer so that it sets XSLT parameters at setup time in the transformer. TraxTransformer apparently has access to the ObjectModelHelper, from which I can extract the request/session and then pass it to the transformer, and the stylesheet passes them to the target object by means of Xalan extension functions. If you have any other ideas, I would appreciate. Thanks, Julio - Original Message - From: "Marco Rolappe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 8:10 PM Subject: AW: Non-string sitemap custom parameters > hi, > > as you may know, actions get parameters via avalon Parameters. if you look > at the API you see that the parameters in the end can only contain strings. > so you have no direct way to pass objects of other type. > > but you could pass your objects e.g. via request/session attributes. have a > look at the respective docs/API. > > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]Im Auftrag > von jcplerm > Gesendet: Dienstag, 21. Januar 2003 02:35 > An: [EMAIL PROTECTED] > Betreff: Non-string sitemap custom parameters > > > Hello, > > I need to pass an object of arbitrary type from one action down to another > along a sitemap pipeline, but unfortunately it seems that they are all cast > to String. > > This is an example: > > > > > > > > > > > > > > > > > "ObjectRetriever" puts an object into its return hashmap, with key > "objParam". It is passed to "CheckParamType" with the same name. > Unfortunately, tracing code in "CheckParamType" logs the fact that objParam > is of type java.lang.String, when it should be something else (like a > Vector, for instance). > > Any ideas how I could do that? > > Thanks, > > Julio Lerm > Chicago, IL > > > - > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > - Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
Non-string sitemap custom parameters
Hello, I need to pass an object of arbitrary type from one action down to another along a sitemap pipeline, but unfortunately it seems that they are all cast to String. This is an example: "ObjectRetriever" puts an object into its return hashmap, with key "objParam". It is passed to "CheckParamType" with the same name. Unfortunately, tracing code in "CheckParamType" logs the fact that objParam is of type java.lang.String, when it should be something else (like a Vector, for instance). Any ideas how I could do that? Thanks, Julio Lerm Chicago, IL