[SUMMARY]: document() XSLT function not working properly [WAS: Is this as anomaly ?]
Folks, the anomaly I've found (document XSLT function returning a string instead of a node-set) is linked to the Xalan version AND the incremental-processing parameter. It could be summarized as follows: 1) Xalan 2.2.0.D14 and incremental-processing set to true: Error 2) Xalan 2.2.0.D14 and incremental-processing set to false: Ok 3) Xalan 2.3.1 and incremental-processing set to true: Ok 4) Xalan 2.3.1 and incremental-processing set to false: Ok Unfortunately, since Xalan 2.3.1 has a lot of bugs in it, I'm bounded to use 2.2.0.D14. Therefore, I had to set the incremental-processing to false manually when I switched to Cocoon 2.0.3, since the default is true (note: the default is false in Cocoon 2.0.2, which explains why I didn't notice the problem with that version of Cocoon). Best regards, P.S. Vadim, thanks for the hint about Xalan ! Luca Morandini [EMAIL PROTECTED] We are protected from the virus by Norton Antivirus Corporate Edition - 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]
once again urlrewriting
hi all! i use cocoon 2.0.2, win2000 and weblogic 6.0sp2 sorry to write again about my problem with url-rewriting. i want to tell again, in a detailed from, my problem. maybe someone can help me. i wrote a web-app using a java action described in http://comphy.fsu.edu/xml/docs/actions.html with additional session-handling. with the use of cookies, everthing is fine - now i want to do it with url-rewriting and i did it the following way. my action looks as following (here a code snipped from the main-part) --- package com.isolab.or.action; import org.apache.avalon.framework.parameters.Parameters; import org.apache.cocoon.acting.AbstractAction; import org.apache.cocoon.Constants; import org.apache.cocoon.environment.Redirector; import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.SourceResolver; import org.apache.cocoon.environment.Session; import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Response; import java.util.*; import java.util.Map; import java.util.HashMap; public class ORMainAction extends AbstractAction { public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters params) { Map sitemapParams = new HashMap(); Request req = ObjectModelHelper.getRequest(objectModel); Session session = req.getSession(); if (session.isNew()) { session.setAttribute(atr1, TestAttribute1); sitemapParams.put(nextpage, test1); } else { session.setAttribute(atr2, TestAttribute2); sitemapParams.put(nextpage, test2); } return sitemapParams; } } my sitemap looks as following -- as described in http://xml.apache.org/cocoon/userdocs/transformers/encodeurl-transformer .html . . map:transformer logger=sitemap.transformer.encodeURL name=encodeURL src=org.apache.cocoon.transformation.EncodeURLTransformer/ . . map:action name=ORAction src=com.isolab.or.action.ORMainAction/ . . . map:match pattern=startOR map:act type=ORAction map:generate src=orneu/{nextpage}.xsp type=serverpages/ map:transform src=orneu/xml2html.xsl type=xslt/ map:transform type=encodeURL/ /map:act map:serialize type=html/ /map:match i turned off the use of cookies in my weblogic-property file weblogic.xml --- if i call my page an the action is called the first time, everthing works fine (a new session is created, ...). but the second time with the same browser (when the session is still there), the session is creted again). this doesn't happen when i enable cookies in my welogic.xml propertiy file welogic.xml -- ?xml version=1.0 encoding=UTF-8? weblogic-web-app session-descriptor session-param param-nameCookiesEnabled/param-name param-valueTrue/param-value /session-param session-param param-nameURLRewritingEnabled/param-name param-valueTrue/param-value /session-param session-param param-nameSessionTrackingEnabled/param-name param-valueTrue/param-value /session-param /session-descriptor /weblogic-web-app i studied the EncodeURLTransformer, but it doesn't helped me (i don't know how to in my action use this for url-rewriting) i also read chapters in some books about url-rewriting, they always use response.encodeURL(URL); but how can i use this response in my action? what do i have to modify? how can i use the EncodeURLTransformer in my action? do i have to do this? is the only part to change, to use url-rewriting to insert map:serialize type=html/ in my sitemap? are there some examples or has someone examples doing url-rewriting with cocoon and actions. i tried several tasks, but it always leeds to the error (every time a new session is creted and the previous session information is lost) described above. please help, if someone has an answere. greetings, chris - 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]
Howto debug sitemap flowcontrol ?
Hy; Is there some logging facility, that shows me, which resources have been utilised for one specific browser-request ? A list of entries in a logfile would be very helpfull for me. It would be rather fancy, if i could get such a list in a separate browser window, telling me, which resources have been taken from the cache, which ones came from the filesystem and so on... any help is welcome. regards, hussayn -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 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]
[SUMMARY] Encoding form data
Cocoon does not support non-US characters when posting data to the server. Characters like è (e accent grave) are translated to two strange characters when checking the posted data. iso-8859-1 is the default encoding for Cocoon and it does support all necessary West European characters (thanks to Bruno for pointing this out). You can find out more on iso-8859-1 on http://www.bbsinc.com/iso8859.html If you need support for other characters you will need to replace iso-8859-1 with UTF-8 which has Unicode support. More on UTF can be found at http://www.columbia.edu/kermit/utf8.html When you create a webform and post to a pipeline that has a request generator and an XML serializer you will see that posted data is not correctly presented. To correct this you need to add the request.setCharacterEncoding method to set the encoding for the request data. This method is captured in the setCharacterEncodignAction action. To use it simply add map:action name=set-encoding src=org.apache.cocoon.acting.SetCharacterEncodingAction/ to the action component block Then add this at the beginning of every pipeline that catches requested non-ASCII data map:act type=set-encoding map:parameter name=form-encoding value=iso-8859-1/ /map:act Of course you need to replace iso-8859-1 with UTF-8 if you need to use that encoding. Another important thing is that you must make sure the data is sent out to the browser with the correct encoding in the first place. To achieve this add the encoding to the XML and the (x)html serializers. map:serializer mime-type=text/html name=html src=org.apache.cocoon.serialization.HTMLSerializer pool-grow=4 pool-max=32 pool-min=4 logger=sitemap.serializer.html buffer-size1024/buffer-size encodingiso-8859-1/encoding /map:serializer This should do it! Have fun. Bert This mail is written in 100% recycled electrons. - 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]
Cocoon task scheduler
Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - 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]
Re: Cocoon task scheduler
On Monday 28 October 2002 14:02, [EMAIL PROTECTED] wrote: . . . So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? . . . Hi Sylvain, There were some discussions about scheduling a while ago here, see http://marc.theaimsgroup.com/?l=xml-cocoon-devw=2r=1s=schedulerq=b (threads are somewhat broken, you might need to do some hunting). I don't remember if anyone found or created a good solution, but you might want to track the ideas found in these discussions. There is a project named jcron (http://p.clark.home.mindspring.com/jcron/), and I think Avalon has some scheduling component too. Personally I would recommend against adding more internal non-core functionality to Cocoon (there's s much stuff in there already IMHO), but rather doing something external, which is also more reusable. -Bertrand - 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]
Re: Cocoon task scheduler
There has been a similar thread before. dig up that one first. Cocoon, being a servlet, only reacts to http requests. So the only way to activate things on a timely basis is to use another program that calls a URL, and thus a pipeline, that activates whatever you want to get done. A wget in a cron job can do the trick. Bert At 14:02 28/10/2002 +0100, you wrote: Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - 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]
Cocoon SQL Transformation
Hi all, Quick question to do with the way the cocoon SQL parser copes with multiple SQL statements. There is probably a very quick fix for this but I'm tearing my hair out trying to find it! When inserting using and SQL statement based in XSL like so: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query This is fine, but when you want to add a second it wont do it! I have tried with a second set of execute-query tags, I have tried putting a second set of query tags within an execute-query Any Ideas? Cheers Tom - 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]
RE: Cocoon task scheduler
Hello Bert, Sorry but what is a wget? Sylvain -Message d'origine- De: Bert Van Kets [mailto:bert;vankets.com] Date: lundi, 28. octobre 2002 14:21 À: [EMAIL PROTECTED] Objet: Re: Cocoon task scheduler There has been a similar thread before. dig up that one first. Cocoon, being a servlet, only reacts to http requests. So the only way to activate things on a timely basis is to use another program that calls a URL, and thus a pipeline, that activates whatever you want to get done. A wget in a cron job can do the trick. Bert At 14:02 28/10/2002 +0100, you wrote: Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - 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] - 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]
RE: Cocoon task scheduler
web get, it's a unix program. Also available (via cygwin) for windows. J. Hello Bert, Sorry but what is a wget? Sylvain === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF - 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]
Re: Cocoon task scheduler
How about cron and a python script, which executes a localhost HTTP query? Python has very good support for HTTP. I'm not convinced that Cocoon needs such a beast, when so much mature functionality is available at the OS level. On Mon, 28 Oct 2002 [EMAIL PROTECTED] wrote: Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - 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]
Re: Cocoon SQL Transformation
I can't help you with your problem, but I can tell you that I am using esql in an XSP with this. It works flawlessly when calling multiple queries one after the other. Bert At 13:26 28/10/2002 +, you wrote: Hi all, Quick question to do with the way the cocoon SQL parser copes with multiple SQL statements. There is probably a very quick fix for this but I'm tearing my hair out trying to find it! When inserting using and SQL statement based in XSL like so: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query This is fine, but when you want to add a second it wont do it! I have tried with a second set of execute-query tags, I have tried putting a second set of query tags within an execute-query Any Ideas? Cheers Tom - 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]
RE: Cocoon task scheduler
But cryptic reply John, g wget is indeed a *nix prog that creates an http request and captures the result. Actually, all you need is a program doesn't matter which one that sends out an http request. Heck, you can even use a scheduled off line favorite in IE for this. You will need to set it up on a server that connected to the internet though, to make sure it runs at the requested times. Bert At 13:41 28/10/2002 +, you wrote: web get, it's a unix program. Also available (via cygwin) for windows. J. Hello Bert, Sorry but what is a wget? Sylvain === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF - 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]
RE: Cocoon task scheduler
I completely agree with you and Bertrand: Cocoon have already so much stuffs and it wouldn't be a good solution to add this type of feature. So I need a scheduler app writing in Java because I want to keep independance with OS (my server runs on Windows but I could change this). This scheduler have to provide a way to call an URL. Any suggestions or experiences? Thank you Sylvain -Message d'origine- De: Robert Ellis Parrott [mailto:parrott;fas.harvard.edu] Date: lundi, 28. octobre 2002 14:34 À: [EMAIL PROTECTED] Objet: Re: Cocoon task scheduler How about cron and a python script, which executes a localhost HTTP query? Python has very good support for HTTP. I'm not convinced that Cocoon needs such a beast, when so much mature functionality is available at the OS level. On Mon, 28 Oct 2002 [EMAIL PROTECTED] wrote: Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - 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] - 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]
Re: [SUMMARY] Encoding form data
If somebody implements the database-actions like in the cocoon-example(2.03)http://localhost:8080/cocoon/forms/employeeit is possible to include the set-encoding action into the map:action-sets/-section instead of including it into every pipeline. fragment from cocoon/sitemap.xmap with the additional map:act-element map:action-setsmap:action-set name="employee"map:act type="set-encoding"map:parameter name="form-encoding" value="UTF-8"//map:actmap:act action="Add" type="add-employee"/map:act action="Delete" type="del-employee"/map:act action="Update" type="upd-employee"//map:action-set/map:action-sets Boris - Original Message - From: Bert Van Kets To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 1:48 PM Subject: [SUMMARY] Encoding form data Cocoon does not support non-US characters when posting data to the server.Characters like è (e accent grave) are translated to two strange characters when checking the posted data.iso-8859-1 is the default encoding for Cocoon and it does support all necessary West European characters (thanks to Bruno for pointing this out). You can find out more on iso-8859-1 on http://www.bbsinc.com/iso8859.htmlIf you need support for other characters you will need to replace iso-8859-1 with UTF-8 which has Unicode support. More on UTF can be found at http://www.columbia.edu/kermit/utf8.htmlWhen you create a webform and post to a pipeline that has a request generator and an XML serializer you will see that posted data is not correctly presented. To correct this you need to add the request.setCharacterEncoding method to set the encoding for the request data. This method is captured in the setCharacterEncodignAction action.To use it simply addmap:action name="set-encoding" src="org.apache.cocoon.acting.SetCharacterEncodingAction"/to the action component blockThen add this at the beginning of every pipeline that catches requested non-ASCII data map:act type="set-encoding" map:parameter name="form-encoding" value="iso-8859-1"/ /map:actOf course you need to replace "iso-8859-1" with "UTF-8" if you need to use that encoding.Another important thing is that you must make sure the data is sent out to the browser with the correct encoding in the first place. To achieve this add the encoding to the XML and the (x)html serializers.map:serializer mime-type="text/html" name="html" src="org.apache.cocoon.serialization.HTMLSerializer" pool-grow="4" pool-max="32" pool-min="4" logger="sitemap.serializer.html" buffer-size1024/buffer-size encodingiso-8859-1/encoding/map:serializerThis should do it!Have fun.BertThis mail is written in 100% recycled electrons.-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlTo unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon task scheduler
Try Jcrontab http://jcrontab.sourceforge.net/index.shtml Artur... -Original Message- From: [EMAIL PROTECTED] [mailto:Sylvain.Thevoz;swisscom.com] Sent: October 28, 2002 8:47 AM To: [EMAIL PROTECTED] Subject: RE: Cocoon task scheduler I completely agree with you and Bertrand: Cocoon have already so much stuffs and it wouldn't be a good solution to add this type of feature. So I need a scheduler app writing in Java because I want to keep independance with OS (my server runs on Windows but I could change this). This scheduler have to provide a way to call an URL. Any suggestions or experiences? Thank you Sylvain -Message d'origine- De: Robert Ellis Parrott [mailto:parrott;fas.harvard.edu] Date: lundi, 28. octobre 2002 14:34 À: [EMAIL PROTECTED] Objet: Re: Cocoon task scheduler How about cron and a python script, which executes a localhost HTTP query? Python has very good support for HTTP. I'm not convinced that Cocoon needs such a beast, when so much mature functionality is available at the OS level. On Mon, 28 Oct 2002 [EMAIL PROTECTED] wrote: Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/in dex.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] - 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]
R: Cocoon SQL Transformation
Tom, every query element should live within a separate execute-query one, like in: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('2', '3') /query /execute-query I suppose you've already try this... then, what's the error you get ? Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Tom Place [mailto:psyttrp;nottingham.ac.uk] Inviato: lunedì 28 ottobre 2002 14.27 A: [EMAIL PROTECTED] Oggetto: Cocoon SQL Transformation Hi all, Quick question to do with the way the cocoon SQL parser copes with multiple SQL statements. There is probably a very quick fix for this but I'm tearing my hair out trying to find it! When inserting using and SQL statement based in XSL like so: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query This is fine, but when you want to add a second it wont do it! I have tried with a second set of execute-query tags, I have tried putting a second set of query tags within an execute-query Any Ideas? Cheers Tom - 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] We are protected from the virus by Norton Antivirus Corporate Edition - 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]
Concept problem using modular actions ..
Hi ALL! I've been working and testing cocoon for about 3 weeks ... after some simple examples i started some more complex stuff .. Right now i´m trying to understand the proper way to work with modular actions .. so imagine this ... One table, SIGLAS, is the main information table, it consists of 5 columns ID, SIGLA, DOM_REF, DESC_REF, QUEM_REF. There are also 3 tables, SIGLAS_DOMINIOS, SIGLAS_DESCRICOES, SIGLAS_QUEM, with the following columns ID, NAME. The columns DOM_REF, DESC_REF, QUEM_REF hold a foreign key to the 3 tables mentioned before (to the column ID of course). So my descriptor file is something like .. sigla connectionpersonnel/connection table name=SIGLAS_DOMINIOS keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=NOME type=string/ /values /table table name=SIGLAS_DESCRICOES keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=DESCRICAO type=string/ /values /table table name=SIGLAS_QUEM keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=NOME type=string/ /values /table table name=SIGLAS keys key name=ID type=int autoincrement=true mode name=auto type=autoincr/ /key /keys values value name=NOME type=string/ value name=DOM_REF type=int mode name=request parameter=SIGLAS_DOMINIOS.ID type=request/ mode name=attribute parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D OMINIOS.ID[0] type=attrib/ /value value name=DESC_REF type=int mode name=request parameter=SIGLAS_DESCRICOES.ID type=request/ mode name=attribute parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D ESCRICOES.ID[0] type=attrib/ /value value name=QUEM_REF type=int mode name=request parameter=SIGLAS_QUEM.ID type=request/ mode name=attribute parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_Q UEM.ID[0] type=attrib/ /value /values /table table-set name=all-dominios table name=SIGLAS_DOMINIOS/ /table-set table-set name=all-descricoes table name=SIGLAS_DESCRICOES/ /table-set table-set name=all-quem table name=SIGLAS_QUEM/ /table-set table-set name=add-siglas table name=SIGLAS others-mode=attrib/ /table-set And my problem is something like this .. i've got a ADD_PAGE in which you can add stuff on the main table, but you can also add of refer stuff from the other tables (through a SELECT field) SIGLAS_DOMINIOS, SIGLAS_DESCRICOES, SIGLAS_QUEM. I've got only one action on the page and my execution should be something like this .. - if its a new SIGLAS_DOMINIO value then add it .. - if its a new SIGLAS_DESCRICOES value then add it .. - if its a new SIGLAS_QUEM value then add it .. - at last add to the SIGLAS table considering the new or existing ID's from the other tables. Ok, so i'm trying to do it all in a action set .. like this .. (Only a part of sitemap ) --- sitemap --- map:action-sets map:action-set name=addSigla map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_DOMINIOS.NOME/ map:act type=siglaAdd map:parameter name=table-set value=all-dominios/ /map:act /map:act map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_DESCRICOES.DESCRICAO/ map:act type=siglaAdd map:parameter name=table-set value=all-descricoes/ /map:act /map:act map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_QUEM.NOME/ map:act type=siglaAdd map:parameter name=table-set value=all-quem/ /map:act /map:act map:act type=siglaAdd map:parameter name=table-set value=add-siglas/ /map:act /map:action-set /map:action-sets map:pipelines map:pipeline map:match pattern=processa-siglas map:act set=addSigla map:generate src=documents/list-siglas.xsp type=serverpages/ map:transform src=stylesheets/simple.xsl/ map:serialize/ /map:act /map:match --- sitemap --- So my BIG problem is how to do this? Must i declare a table-set for each operation combination ? (like DOM as foreign key but DESC has not, and so on ..) If i use a mode like attrib, i'm using it for all the foreign keys .. i want to get the ID by a request attribute only on from the tables i inserted before. The ones i selected (not added) are just on the request parameter ! How can i do this in ONE request ? Is there any ConvertAllRequestParametersToRequestAttributes action ? I've come to the conclusion it is faster to write some logic on a couple of XSP's than to use the actions this way. Thanks in advance to any help ! (Hit me if i'm saying something really stupid :) .. and sorry about the typos .. ) [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - Please check that your
RE: Cocoon task scheduler
Both python perl have ports to just about every OS, more than Java. And python in particular is mindlessly easy to write in, and has the extra bonus in that it has been ported to Java (Jython) Check out ActivePerl ActivePython at http://www.activestate.com (windows ports, unixx ports are easy to find). How you schedule the scripts to run will be OS dependent. But there's probably some crond functionality in Cygwin, in which case using cron as your scheduler is pretty much platform independent as well, both Unix Windows. Also, there's a crond for Windows written in python: http://pycron32.sourceforge.net/ don't know anything about it though, just googled it. rob On Mon, 28 Oct 2002 [EMAIL PROTECTED] wrote: I completely agree with you and Bertrand: Cocoon have already so much stuffs and it wouldn't be a good solution to add this type of feature. So I need a scheduler app writing in Java because I want to keep independance with OS (my server runs on Windows but I could change this). This scheduler have to provide a way to call an URL. Any suggestions or experiences? Thank you Sylvain -Message d'origine- De: Robert Ellis Parrott [mailto:parrott;fas.harvard.edu] Date: lundi, 28. octobre 2002 14:34 À: [EMAIL PROTECTED] Objet: Re: Cocoon task scheduler How about cron and a python script, which executes a localhost HTTP query? Python has very good support for HTTP. I'm not convinced that Cocoon needs such a beast, when so much mature functionality is available at the OS level. On Mon, 28 Oct 2002 [EMAIL PROTECTED] wrote: Hello everybody, I'm writing application with Cocoon which include Cocoon portal, authentication, etc.. All you need when you use an application server. But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix). So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)?? Could I use an independant software in my server or is there a concept in Cocoon? Thank you Sylvain - 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] - 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]
Re: [SUMMARY] Encoding form data
Don't get this wrong. You needn't add the action in every pipeline, just in the ones that capture form data where you can expect non-ASCII characters. Thanks for the addition. Bert At 14:59 28/10/2002 +0100, you wrote: If somebody implements the database-actions like in the cocoon-example(2.03) http://localhost:8080/cocoon/forms/employeehttp://localhost:8080/cocoon/forms/employee it is possible to include the set-encoding action into the map:action-sets/-section instead of including it into every pipeline. fragment from cocoon/sitemap.xmap with the additional map:act-element map:action-sets map:action-set name=employee map:act type=set-encoding map:parameter name=form-encoding value=UTF-8/ /map:act map:act action=Add type=add-employee/ map:act action=Delete type=del-employee/ map:act action=Update type=upd-employee/ /map:action-set /map:action-sets Boris - Original Message - From: mailto:bert;vankets.comBert Van Kets To: mailto:cocoon-users;xml.apache.org[EMAIL PROTECTED] Sent: Monday, October 28, 2002 1:48 PM Subject: [SUMMARY] Encoding form data Cocoon does not support non-US characters when posting data to the server. Characters like è (e accent grave) are translated to two strange characters when checking the posted data. iso-8859-1 is the default encoding for Cocoon and it does support all necessary West European characters (thanks to Bruno for pointing this out). You can find out more on iso-8859-1 on http://www.bbsinc.com/iso8859.htmlhttp://www.bbsinc.com/iso8859.html If you need support for other characters you will need to replace iso-8859-1 with UTF-8 which has Unicode support. More on UTF can be found at http://www.columbia.edu/kermit/utf8.htmlhttp://www.columbia.edu/kermit/utf8.html When you create a webform and post to a pipeline that has a request generator and an XML serializer you will see that posted data is not correctly presented. To correct this you need to add the request.setCharacterEncoding method to set the encoding for the request data. This method is captured in the setCharacterEncodignAction action. To use it simply add map:action name=set-encoding src=org.apache.cocoon.acting.SetCharacterEncodingAction/ to the action component block Then add this at the beginning of every pipeline that catches requested non-ASCII data map:act type=set-encoding map:parameter name=form-encoding value=iso-8859-1/ /map:act Of course you need to replace iso-8859-1 with UTF-8 if you need to use that encoding. Another important thing is that you must make sure the data is sent out to the browser with the correct encoding in the first place. To achieve this add the encoding to the XML and the (x)html serializers. map:serializer mime-type=text/html name=html src=org.apache.cocoon.serialization.HTMLSerializer pool-grow=4 pool-max=32 pool-min=4 logger=sitemap.serializer.html buffer-size1024/buffer-size encodingiso-8859-1/encoding /map:serializer This should do it! Have fun. Bert This mail is written in 100% recycled electrons. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: mailto:cocoon-users-unsubscribe;xml.apache.org[EMAIL PROTECTED] For additional commands, e-mail: mailto:cocoon-users-help;xml.apache.org[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]
RE: Cocoon SQL Transformation
I have tried it like you say however am still getting an internal server error: org.apache.cocoon.ProcessingException: Exception during processing of file:/C:/tomcat/webapps/cocoon/autorevs/docs/doregister.xml: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException The page will run with the sql commented out so thats not the problem and the sql actually does insert into the db, but then you get the above! Tom -Original Message- From: Luca Morandini [mailto:spectrum.morandini;ipzs.it] Sent: 28 October 2002 14:06 To: [EMAIL PROTECTED] Subject: R: Cocoon SQL Transformation Tom, every query element should live within a separate execute-query one, like in: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('2', '3') /query /execute-query I suppose you've already try this... then, what's the error you get ? Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Tom Place [mailto:psyttrp;nottingham.ac.uk] Inviato: lunedì 28 ottobre 2002 14.27 A: [EMAIL PROTECTED] Oggetto: Cocoon SQL Transformation Hi all, Quick question to do with the way the cocoon SQL parser copes with multiple SQL statements. There is probably a very quick fix for this but I'm tearing my hair out trying to find it! When inserting using and SQL statement based in XSL like so: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query This is fine, but when you want to add a second it wont do it! I have tried with a second set of execute-query tags, I have tried putting a second set of query tags within an execute-query Any Ideas? Cheers Tom - 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] We are protected from the virus by Norton Antivirus Corporate Edition - 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]
Re: Concept problem using modular actions ..
On 28.Oct.2002 -- 02:07 PM, Rui Leal wrote: Hi ALL! I've been working and testing cocoon for about 3 weeks ... after some simple examples i started some more complex stuff .. Right now i´m trying to understand the proper way to work with modular actions .. so imagine this ... One table, SIGLAS, is the main information table, it consists of 5 columns ID, SIGLA, DOM_REF, DESC_REF, QUEM_REF. There are also 3 tables, SIGLAS_DOMINIOS, SIGLAS_DESCRICOES, SIGLAS_QUEM, with the following columns ID, NAME. The columns DOM_REF, DESC_REF, QUEM_REF hold a foreign key to the 3 tables mentioned before (to the column ID of course). [...] map:action-sets map:action-set name=addSigla map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_DOMINIOS.NOME/ map:act type=siglaAdd map:parameter name=table-set value=all-dominios/ /map:act /map:act map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_DESCRICOES.DESCRICAO/ map:act type=siglaAdd map:parameter name=table-set value=all-descricoes/ /map:act /map:act map:act type=req-params map:parameter name=parameters value=add-sigla SIGLAS_QUEM.NOME/ map:act type=siglaAdd map:parameter name=table-set value=all-quem/ /map:act /map:act map:act type=siglaAdd map:parameter name=table-set value=add-siglas/ /map:act /map:action-set /map:action-sets There has been a problem using nested actions in an action-set in 2.1 and most likely treeprocessor in 2.0.x. So my BIG problem is how to do this? That means, your code does not work as expected? What does it do, then? Must i declare a table-set for each operation combination ? (like DOM as foreign key but DESC has not, and so on ..) This or a cocoon-action-* parameter for every combination. Personally, I'd prefer not to use an action-set but code the selection logic myself. You sure want to do form-validation (XMLForms or other), don't you. That or the RequestParameterExistsAction would come in handy here. I see that you already use the latter. If i use a mode like attrib, i'm using it for all the foreign keys .. i You don't have to. You can change the mode-name for every attribute and every mode-type. The mode-type can be specified through the table-set. In addition there's the all mode-type that would be used regardless of the requested mode-type (if the requested type wasn't found before). want to get the ID by a request attribute only on from the tables i inserted before. The ones i selected (not added) are just on the request parameter ! CVS 2.1 has a ChainMetaModule that allows to specify a preference list of InputModules. The first one returning a value != null is used. I'm currently working on something in that area. Once that is finished, 2.0.4-CVS will get updated. In the mean time, it should be safe to copy it together with the AbstractMetaModule from 2.1 to 2.0.4, rebuild, and add it to cocoon.xconf if you need it fast. How can i do this in ONE request ? see above. Is there any ConvertAllRequestParametersToRequestAttributes action ? I believe so. If not, it's no big deal writing it yourself. The ChainMetaModule from 2.1 is another solution. I've come to the conclusion it is faster to write some logic on a couple of XSP's than to use the actions this way. If you don't mind to mix concerns, that is. The problem with your scenario is that you want everything to happen in one invocation of the actions. HTH Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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]
RE: Cocoon and EJB
Would you mind integrating it into the CocoonWiki (http://www.outerthought.net)? If no and it's easier for you I can do it for you. Reinhard, go ahead and add it if you wish; everything in the document is based on stuff from the Cocoon-user archives, with some modifications. As I said, it's a bit out of date, anyone who is currently attempting this might be able to bring it up to date as they work through it. Also, I strongly suspect that the section on working with Oracle isn't 100% accurate, but I haven't spent anytime trying to determine if this is true. -Original Message- From: Hunsberger, Peter [mailto:Peter.Hunsberger;stjude.org] Sent: Friday, October 25, 2002 4:59 PM To: '[EMAIL PROTECTED]' Subject: RE: Cocoon and EJB I have a doubt whether it is possible (and easy :) to fetch data from EJB (connected to a DB) and produce HTML pages from both XML/XSL documents and these data. Despite Michael Homeijer interesting answers, there were not many responses, and it seems to me there are never a lot when it comes to EJB and Cocoon. As I am also interested, is really nobody out there who knows much more about it...? Are there any resources available focusing on EJB and Cocoon? Don't know about resources, but I also don't really see what the issue is? In our case we use JBoss with Tomcat and Cocoon. We define the EJB resources through JBoss and don't worry about them in Cocoon. We then package up the Cocoon WAR with our EJB JAR into a EAR and deploy it under JBoss. With the proper JNDI definitions in JBoss all is done; your Cocoon classes see the EJBs and away you go. It took me perhaps a week of fiddling to get this going, but the magic trick is to make sure you've got all the classes in the proper places for the particular combination of Tomcat, JBoss, JDK and Cocoon. Following is a summary of various messages I've found that I used to create some basic instructions for our developers on how to get the whole thing up and running. Some of this is out of date, since new binaries are now available that did not exist when I wrote this and life is now a bit simpler. How to deploy Cocoon on JBoss and Tomcat 1. Deploy tomcat/jboss. Versions 4.0/2.4.3 are apparently known to work. We use 4.0.4 and 2.4.4. Note that according to the Cocoon2 homepage certain beta versions of Tomcat dows not work with Cocoon2. To deploy Tomcat 4.0.4 use the integrated 2.4.4/4.0.1 Tomcat/Jboss then copy a Tomcat 4.0.4 install over the catalina directory structure in the Jboss/Tomcat install. If you do this, I'd rename the base directory to help keep things straight as to what is installed. 2. Add environment variable CATALINA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7070. This is to be able to debug java run in Tomcat. For Netbeans 3.2.1 for programming/debugging (remember to add port 7070 to debugging environment). 3. Delete in [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib following: -crimson.jar -jaxp.jar -xml.jar (xml.jar is not present in latest versions of JBoss.) If Tomcat 3.x is used the following files must be also be deleted: from [your path]/JBoss-xxx_Tomcat-3.x/tomcat/lib: -parser.jar -jaxp.jar 4. new run.bat file in [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/bin to: @echo off @if not %ECHO% == echo %ECHO% @if %OS% == Windows_NT setlocal set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;run.jar REM Add all login modules for JAAS-based security REM and all libraries that are used by them here REM need one of the two following lines for xerces support set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/xerces.jar REM set JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/xml-apis.jar REM Add the XML parser jars and set the JAXP factory names REM Crimson parser JAXP setup(default) REM set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar REM set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson .jaxp.Docu men tBuilderFactoryImpl REM set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPa rserFactor yIm pl echo JBOSS_CLASSPATH=%JBOSS_CLASSPATH% java %JAXP% -classpath %JBOSS_CLASSPATH% org.jboss.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 pause 5. If you want to be able to debug JBoss/Tomcat/Cocoon2 replace the last line (before pause) with: java -Xint -Xdebug -Xnoagent -classpath %JBOSS_CLASSPATH% -Xrunjdwp:transport=dt_socket,server=y,address=12999,suspend=n org.jboss.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 If you use Netbeans 3.2.1 for programming/debugging remember to add port 12999 to debugging environment. 6. copy xerces.jar to [your path]/JBoss-2.4.3_Tomcat-4.0/jboss/lib. We used versions 1.4.3. Download xerces binary and use .jar file in the downloaded xerces_xxx.zip
R: Cocoon SQL Transformation
Tom, could you post the XML document that fails ? Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Tom Place [mailto:psyttrp;nottingham.ac.uk] Inviato: lunedì 28 ottobre 2002 15.38 A: [EMAIL PROTECTED] Oggetto: RE: Cocoon SQL Transformation I have tried it like you say however am still getting an internal server error: org.apache.cocoon.ProcessingException: Exception during processing of file:/C:/tomcat/webapps/cocoon/autorevs/docs/doregister.xml: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException The page will run with the sql commented out so thats not the problem and the sql actually does insert into the db, but then you get the above! Tom -Original Message- From: Luca Morandini [mailto:spectrum.morandini;ipzs.it] Sent: 28 October 2002 14:06 To: [EMAIL PROTECTED] Subject: R: Cocoon SQL Transformation Tom, every query element should live within a separate execute-query one, like in: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('2', '3') /query /execute-query I suppose you've already try this... then, what's the error you get ? Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Tom Place [mailto:psyttrp;nottingham.ac.uk] Inviato: lunedì 28 ottobre 2002 14.27 A: [EMAIL PROTECTED] Oggetto: Cocoon SQL Transformation Hi all, Quick question to do with the way the cocoon SQL parser copes with multiple SQL statements. There is probably a very quick fix for this but I'm tearing my hair out trying to find it! When inserting using and SQL statement based in XSL like so: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query This is fine, but when you want to add a second it wont do it! I have tried with a second set of execute-query tags, I have tried putting a second set of query tags within an execute-query Any Ideas? Cheers Tom - 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] We are protected from the virus by Norton Antivirus Corporate Edition - 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] We are protected from the virus by Norton Antivirus Corporate Edition - 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]
Re: Concept problem using modular actions ..
On 28.Oct.2002 -- 03:39 PM, Christian Haul wrote: On 28.Oct.2002 -- 02:07 PM, Rui Leal wrote: 2.0.4-CVS will get updated. In the mean time, it should be safe to copy it together with the AbstractMetaModule from 2.1 to 2.0.4, rebuild, and add it to cocoon.xconf if you need it fast. Actually you would need a CVS version from yesterday or so. The current 2.1 has a different InputModule interface. 2.0.x is to follow shortly. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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]
RE: Cocoon SQL Transformation
OK the full story: The xml file that is the generator is as follows: doregister/ This is then passed through an XSL file : ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; !-- Make the request parameter available -- xsl:param name=username/ xsl:param name=password/ xsl:param name=first/ xsl:param name=last/ xsl:template match=doregister user detail namexsl:value-of select=$username//name passwordxsl:value-of select=$password//password firstxsl:value-of select=$first//first lastxsl:value-of select=$last//last /detail existing-user execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query SELECT * from user_info where USERNAME = 'xsl:value-of select=$username/' /query /execute-query /existing-user /user /xsl:template /xsl:stylesheet After this it is then passed to the XSL that fails ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:sql=http://apache.org/cocoon/SQL/2.0; xsl:template match=user page xsl:choose xsl:when test=existing-user/sql:rowset/sql:row titleRegistration Error: Autorevs - UK Car Reviews/title headingRegistration Error/heading navigation item linkhome/link displayHome/display /item item linklogin/link displayLogin/display /item item linkregister/link displayRegister/display /item item linkabout/link displayAbout/display /item /navigation main item titleUsername Already Taken!/title bodyThe Username you selected is already in use by another member. Please select a different one./body /item /main /xsl:when xsl:otherwise execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into user_info (USER_ID, USERNAME) values ('', 'test') /query /execute-query titleRegistration Success: Autorevs - UK Car Reviews/title headingRegistration Success/heading navigation item linkhome/link displayHome/display /item item linklogin/link displayLogin/display /item item linkregister/link displayRegister/display /item item linkabout/link displayAbout/display /item /navigation main item titleRegistration Successful!/title bodyCongratulations xsl:value-of select=detail/first/ . Your details have now been stored by the autorevs system. Please login!/body /item /main /xsl:otherwise /xsl:choose /page /xsl:template /xsl:stylesheet -Original Message- From: Luca Morandini [mailto:spectrum.morandini;ipzs.it] Sent: 28 October 2002 14:45 To: [EMAIL PROTECTED] Subject: R: Cocoon SQL Transformation Tom, could you post the XML document that fails ? Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Tom Place [mailto:psyttrp;nottingham.ac.uk] Inviato: lunedì 28 ottobre 2002 15.38 A: [EMAIL PROTECTED] Oggetto: RE: Cocoon SQL Transformation I have tried it like you say however am still getting an internal server error: org.apache.cocoon.ProcessingException: Exception during processing of file:/C:/tomcat/webapps/cocoon/autorevs/docs/doregister.xml: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException The page will run with the sql commented out so thats not the problem and the sql actually does insert into the db, but then you get the above! Tom -Original Message- From: Luca Morandini [mailto:spectrum.morandini;ipzs.it] Sent: 28 October 2002 14:06 To: [EMAIL PROTECTED] Subject: R: Cocoon SQL Transformation Tom, every query element should live within a separate execute-query one, like in: execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('1', '2') /query /execute-query execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into my_table (Col1, Col2) values ('2', '3') /query /execute-query I suppose you've already try this... then, what's the error you get ? Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Tom Place [mailto:psyttrp;nottingham.ac.uk] Inviato: lunedì 28 ottobre 2002 14.27 A: [EMAIL PROTECTED] Oggetto: Cocoon SQL Transformation Hi all, Quick question to do with the way the cocoon SQL parser copes with multiple SQL statements. There is probably a very quick fix for this
Re: internalisation with schematron (XML-Form)
Hallo Ivelin, I already wrote a How To Document for this and uploaded it using Bugzilla . I hope it will be clear and easy to follow. and its Bug#14015. Thanx in advance Mohamed El-Refaey Ivelin Ivanov wrote: Mohamed, would you consider submitting your email as a how-to document in bugzilla. The question about i18n with XMLForm is popping constantly. Ivelin - Original Message - From: Mohamed El-Refaey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 27, 2002 4:08 PM Subject: Re: internalisation with schematron (XML-Form) Hi Michael , I faced the same problem and here is what I did when I read the mailing list regarding the i18n with Schematron validation error : 1- the XMLForm file is : xf:password ref=/password xf:captioni18n:textPassword/i18n:text/xf:caption xf:violations class=error/ /xf:password 2- the Schematron file : rule context=/password assert test=string-length(.) gt; 7 The Password Should be @ least 8 character. /assert /rule /pattern 3-the sitemap : map:transform type=xmlform label=xml/ map:transform src=xforms/stylesheets/translate.xsl/ map:act type=locale map:transform type=i18n map:parameter name=locale value={locale}/ /map:transform /map:act in which the translate.xsl file is the that what they r talking about in the mailing list : ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002; xmlns:i18n=http://apache.org/cocoon/i18n/2.0; xsl:template match=document document xsl:apply-templates/ /document /xsl:template xsl:template match=xf:violation xf:violation i18n:text xsl:value-of select=./ /i18n:text /xf:violation /xsl:template xsl:template match=node() priority=-1 xsl:copy xsl:copy-of select=@*/ xsl:apply-templates/ /xsl:copy /xsl:template /xsl:stylesheet and the Catalog file : message key=PasswordPassword/message I wish this will help u Mohamed Michael Bald wrote: Hi! I have a problem to translate the error-massages of the schematrons. I hope someone can give me a hint to solve my problem. I want to translate the Error Message of my pattern in the Schematron file. But I don´t know exactly how. I tried the way I found in the Mail archives of cocoon, but it didn´t work in my case. I hope someone can answer me how to include the internalisation in my schematron file. In the xml file I have following: xf:form xf:password ref=/password xf:caption i18n:textpassword_field/i18n:text /xf:caption xf:violation class=error/ /xf:form The schematron file has following pattern: rule context=/password assert test=string-lenght... Error_message that I want to translate! /assert /rule And the translation file has allready: ... message key=password_fieldPassword/message message key=The password is to long!/message ... sitemap: ... map:generate src= map:transform type=i18n map:parameter name=locale value={./locale}/ /map:transform map:transform type=xmlform label=xml map:transform src= ... I tried allready to switch the transformers...but it didn´t work. Hopefully someone can help me with this problem. Greetings Michael - 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] - 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]
RE: CaheValidity toString()
I am running into this same problem (I think) but I'm confused as to what to do about it. I have xsp's with generateKey() and generateValidity()methods, and when I put the xsp in an aggregate, cocoon re-aggregates every time, instead of used the cached aggregated value. The symptom is that it says that the TimeStamp Validity is not the same for my aggregated component. I'm using my own CacheValidity, which does have a toString() method. I've tried replacing my xsp with the cacheable.xsp from the cocoon sample application, and I get the same problem--the aggregate isn't cached. Is there some other method I need to implement somewhere? Thanks, Steve -Original Message- From: David LAGARDERE [mailto:dlagardere;yahoo.fr] Sent: Friday, September 13, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: CaheValidity toString() Hello. Sorry if the following was documented. However, after many hours I spent on it, I found interesting to describe what I've found about Caching. I would like to have your opinion on a solution I've found to my troubles with Cacheability of aggregated content (see the previous mails I've sent). The problem I had was the fact that Cocoon didn't cache a StreamPipeline containing an aggregator composed of my own Cacheable Generator : the log told me the TimeStamp Validity of the Pipeline changed everytime I requested the page whereas my generator was always valid ! As each part of an aggregator is a SitemapSource instance, the key and the validity of the pipeline are built upon the SitemapSource last modification date. This date is the concatenation of the Pipeline Cached Key string value and the Pipeline Validity string value. The Pipeline Validity is a Map which associate a Component Cached Key with its validty. Its string representation is the string representation of each pair {key, value}, that is , a call to the toString() method on both Component cached key and Component validity objects. As a consequence, every validity may overload the toString() method returning a relevant value otherwise the returned value will be the memory address of the object, which of course, can't be taken as a relevant value. Please tell me if I'm wrong, but this is the only way I've found to have my CachingStreamPipeline cached ! David Lagardere ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - 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]
XML to Excel file
Does anyone have recommendations on how to get from an XML stream to an Excel file without using cocoon? - 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]
Re: XML to Excel file
Look at the POI project on jakarta.apache.org specifically HSSF. You'd need to parse the XML yourself but POI allows you to read/write Excel files. MD - 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]
Re: XML to Excel file
Hi Chris, when you set the content-type in a servlet like "response.setContentType("application/vnd.ms-excel");" a simple html-table will opened as excel-file, if Excel is installed. but i think it is not a question for [EMAIL PROTECTED] Boris - Original Message - From: Dorsey, Chris To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 5:25 PM Subject: XML to Excel file Does anyone have recommendations on how to get from an XML stream to anExcel file without using cocoon?-Please check that your question has not already been answered in theFAQ before posting. http://xml.apache.org/cocoon/faq/index.htmlTo unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concept problem using modular actions ..
First of all .. thanks for the help ! I've been a complete cocoon fan for 3 weeks now .. I've converted most of my team to it ! :) There has been a problem using nested actions in an action-set in 2.1 and most likely treeprocessor in 2.0.x. .. Ok .. i´ve been using 2.0.3 .. it seems the stable one ! :) .. Btw is there some list of 2.0.3 bugs or problems ? Must i declare a table-set for each operation combination ? (like DOM as foreign key but DESC has not, and so on ..) This or a cocoon-action-* parameter for every combination. Personally, I'd prefer not to use an action-set but code the selection logic myself. .. you mean declaring it on the pipeline and not on a action-set ? You sure want to do form-validation (XMLForms or other), don't you. That or the RequestParameterExistsAction would come in handy here. I see that you already use the latter. Yes .. that was the plan ! :) If i use a mode like attrib, i'm using it for all the foreign keys .. i You don't have to. You can change the mode-name for every attribute and every mode-type. The mode-type can be specified through the table-set. In addition there's the all mode-type that would be used regardless of the requested mode-type (if the requested type wasn't found before). Ok, i got this, but my problem comes from the fact i've got 3 foreign keys that sometimes get their value from a request parameter and sometimes from a request attribute (from the add action on table which is referenced) .. Can i specify something like this ? .. the mode name and mode type of the request attribute is diferent on each foreign key .. table name=SIGLAS keys ... /key /keys values value name=NOME type=string/ value name=DOM_REF type=int mode name=attribute-dom parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D OMINIOS.ID[0] type=attrib-dom/ mode name=request parameter=SIGLAS_DOMINIOS.ID type=all/ /value value name=DESC_REF type=int mode name=attribute-desc parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_D ESCRICOES.ID[0] type=attrib-desc/ mode name=request parameter=SIGLAS_DESCRICOES.ID type=all/ /value value name=QUEM_REF type=int mode name=attribute-quem parameter=org.apache.cocoon.components.modules.output.OutputModule:SIGLAS_Q UEM.ID[0] type=attrib-quem/ mode name=request parameter=SIGLAS_QUEM.ID type=all/ /value /values /table So .. how do i use this ? In a table-set like this ? table-set name=all-siglas table name=SIGLAS others-mode=MODE NAME HERE ? /table /table But in this solution i can only use the mode i specify on others-mode ! .. I need diferent values .. one for each foreign key! Can something like this work ? table-set name=all-siglas table name=SIGLAS mode name=something type=something/ ... /table /table want to get the ID by a request attribute only on from the tables i inserted before. The ones i selected (not added) are just on the request parameter ! CVS 2.1 has a ChainMetaModule that allows to specify a preference list of InputModules. The first one returning a value != null is used. I'm currently working on something in that area. Once that is finished, 2.0.4-CVS will get updated. In the mean time, it should be safe to copy it together with the AbstractMetaModule from 2.1 to 2.0.4, rebuild, and add it to cocoon.xconf if you need it fast. YES! .. my main problem is the != null ... specifying a foreign key from a request attribute returns null if the attribute doesn´t exists. I will check this ChainMetaModule .. Btw can you recommed a cocoon CVS version stable to run on a production server ? Is there any ConvertAllRequestParametersToRequestAttributes action ? I believe so. If not, it's no big deal writing it yourself. The ChainMetaModule from 2.1 is another solution. Ok .. if everything else fails, i will convert all the request parameter to attributes ! I've come to the conclusion it is faster to write some logic on a couple of XSP's than to use the actions this way. If you don't mind to mix concerns, that is. The problem with your scenario is that you want everything to happen in one invocation of the actions. Yes .. in fact i'm using an real application as an example .. I have some FORMS that need to perform a lot of operations on diferent tables. It's not well-formed from a design point of view but it helps the user-interaction. Thanks again for the help .. [--] Rui Pedro Leal [--] [EMAIL PROTECTED] [--] [EMAIL PROTECTED] [--] ICQ: 318173 - 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]
RE: XML to Excel file
Not a full-blown solution, but you can encode a web page with tags in the Excel namespace xmlns:x=urn:schemas-microsoft-com:office:excel and, use formulas etc in html table cells: td style=width:0pt x:fmla==COUNT(A4:A9) width=0 class=x868 span style=mso-spacerun: yes/ /td Try saving an .xls file to .html, and you will get the jist of the format. Then, you can transform your XML data to an Excel-marked-up .html page using XSLT. Just a thought. -Original Message- From: [EMAIL PROTECTED] [mailto:Markdelanoy;aol.com] Sent: Monday, October 28, 2002 11:31 AM To: [EMAIL PROTECTED] Subject: Re: XML to Excel file Look at the POI project on jakarta.apache.org specifically HSSF. You'd need to parse the XML yourself but POI allows you to read/write Excel files. MD - 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]
Re: XML to Excel file
Take a look at POI at http://jakarta.apache.org/poi/index.html to see if it meets your needs. /mde/ just my two cents . . . . __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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]
RE: Cocoon SQL Transformation
OK the actual XML that is going into the failing XSL is as follows: user detail nametomplace/name passwordtom/password firsttom/first lastplace/last /detail existing-user rowset / /existing-user /user The fact that the existing user rowset is empty is a good thing (if it wasn't empty then something else happens that works! The xsl that fails is as follows: ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:sql=http://apache.org/cocoon/SQL/2.0; xsl:template match=user page xsl:choose xsl:when test=existing-user/sql:rowset/sql:row titleBlah/title /xsl:when xsl:otherwise execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query insert into user_info (USERNAME) values (xsl:value-of select=detail/name/) /query /execute-query titleBlah 2/title /xsl:otherwise /xsl:choose /page /xsl:template /xsl:stylesheet -Original Message- From: Luca Morandini [mailto:spectrum.morandini;ipzs.it] Sent: 28 October 2002 15:27 To: [EMAIL PROTECTED] Subject: R: Cocoon SQL Transformation Tom, I guess your pipeline contains a couple XSLT transformations and a couple SQL ones (one for the select, one for the insert), isn't it ? If this is true, could you please send me the XML which is sent to the failing transformation (be it SQL or XSLT) ? I'm interested in the actual XML document going into the transformer, not in the XSL source code. Best regards, Luca Morandini Istituto Poligrafico e Zecca dello Stato [EMAIL PROTECTED] [EMAIL PROTECTED] We are protected from the virus by Norton Antivirus Corporate Edition - 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]
RE: XML to Excel file
Try Perl. I have some good experiences with CPAN modules that parse XML streams and write to Excel. You ony need a few lines of Perl code, it is fast, but it does exactly that (and only that) what you are asking for: convert an XML stream into an Excel file. Cocoon is a different kind of animal. Hugo -Original Message- From: Dorsey, Chris [mailto:chris.dorsey;bankofamerica.com] Sent: Monday, October 28, 2002 5:25 PM To: [EMAIL PROTECTED] Subject: XML to Excel file Does anyone have recommendations on how to get from an XML stream to an Excel file without using cocoon? - 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]
Possible to override encoding of HTMLGenerator output?
Hi, I am bringing some legacy HTML content into a new site using HTMLGenerator and a transformation that alters the XHTML. The content has a bunch of ISO-encoded characters in it, which causes parse problems. After some testing on a static file, I found that when my source XHTML uses the iso-8859-1 encoding, everything works fine. Is there any way I can override the HTMLGenerator to output with 'iso-8859-1' encoding instead of the default UTF-8? Thanks, John __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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]
restricting access to cocoon
I want to be able to restrict access to my Cocoon-based application, either by IP range, login, or both. Is this something I can do easily in cocoon, or should I look into doing this using Tomcat? __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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]
Accessing uri-prefix from within sub-sitemaps?
Hi, I'm using sub-sitemaps now to host several projects at once in my development environment. I access the projects through a URL that looks like this - http://localhost/projects/proj1;, and in the sub-sitemaps I have a XSLTransformer prepend a sitemap variable called base to the beginning of all absolute urls, so that all my links work. I end up entering the uri-prefix by hand, the matcher looks something like this: map:generate src={1}/ map:transform src=style.xsl/ map:transform src=fix_urls.xsl map:parameter name=base value=/projects/ /map:transform map:serialize/ What I would like to do is have base automatically set by accessing the uri-prefix set in the mount element on the main sitemap, then when I deploy the project, there's absoutely no changes that need to be made to the sub-sitemap. Is there a way to do this? Thanks, Justin - 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]
xsp request variable is not declaired
Hi Everyone- Here is a newbe question: I'm trying to use the implicit 'request' variable in a xsp page, however, whenever I try to access it like this I get a NPE error at line x: xsp:logic keyword = request.getParameter(value); //line x /xsp:logic When I attempt to access it like this, I get an illegal start of type error at line x: xsp:logic String comment = ; if (request == null) { //line x comment = Request is null; } else { comment = Request is NOT null; } /xsp:logic This seems to point to 'request' as not having been declared, doesn't it? Doing something like this works: xsp:logic String keyword = C; /xsp:logic content esql:connection esql:poolcocoon/esql:pool esql:execute-query !-- xsp-request:get-parameter name=value/ -- esql:queryselect * from Resources where ResourceName like '%xsp:exprkeyword/xsp:expr%'/esql:query esql:results esql:row-results row esql:get-columns//row /esql:row-results /esql:results /esql:execute-query /esql:connection /content Any ideas? This is driving me up the wall. I would post more of the error code, config, etc, but it seems like this must be something major and (hopefully) obvious. Thanks, Eric Everman - 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]
Re: xsp request variable is not declaired
Make sure you put your request inside a tag. Like this: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp-request=http://apache.org/xsp/request/2.0; data xsp:logic your logic /xsp:logic /data /xsp:page As you can see, I'm using the xsp-request logic sheet. Should be the same though. Bert At 14:46 28/10/2002 -0600, you wrote: Hi Everyone- Here is a newbe question: I'm trying to use the implicit 'request' variable in a xsp page, however, whenever I try to access it like this I get a NPE error at line x: xsp:logic keyword = request.getParameter(value);//line x /xsp:logic When I attempt to access it like this, I get an illegal start of type error at line x: xsp:logic String comment = ; if (request == null) {//line x comment = Request is null; } else { comment = Request is NOT null; } /xsp:logic This seems to point to 'request' as not having been declared, doesn't it? Doing something like this works: xsp:logic String keyword = C; /xsp:logic content esql:connection esql:poolcocoon/esql:pool esql:execute-query !-- xsp-request:get-parameter name=value/ -- esql:queryselect * from Resources where ResourceName like '%xsp:exprkeyword/xsp:expr%'/esql:query esql:results esql:row-results row esql:get-columns//row /esql:row-results /esql:results /esql:execute-query /esql:connection /content Any ideas? This is driving me up the wall. I would post more of the error code, config, etc, but it seems like this must be something major and (hopefully) obvious. Thanks, Eric Everman - 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]
Re: xsp request variable is not declaired
You do not appear to have declared `keyword'. i.e., try: String keyword = request.getParameter(value); Dave - Original Message - From: Eric Everman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 3:46 PM Subject: xsp request variable is not declaired Hi Everyone- Here is a newbe question: I'm trying to use the implicit 'request' variable in a xsp page, however, whenever I try to access it like this I get a NPE error at line x: xsp:logic keyword = request.getParameter(value); //line x /xsp:logic When I attempt to access it like this, I get an illegal start of type error at line x: xsp:logic String comment = ; if (request == null) { //line x comment = Request is null; } else { comment = Request is NOT null; } /xsp:logic This seems to point to 'request' as not having been declared, doesn't it? Doing something like this works: xsp:logic String keyword = C; /xsp:logic content esql:connection esql:poolcocoon/esql:pool esql:execute-query !-- xsp-request:get-parameter name=value/ -- esql:queryselect * from Resources where ResourceName like '%xsp:exprkeyword/xsp:expr%'/esql:query esql:results esql:row-results row esql:get-columns//row /esql:row-results /esql:results /esql:execute-query /esql:connection /content Any ideas? This is driving me up the wall. I would post more of the error code, config, etc, but it seems like this must be something major and (hopefully) obvious. Thanks, Eric Everman - 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]
Re: xsp request variable is not declaired
At 10/28/2002, you wrote: You do not appear to have declared `keyword'. i.e., try: String keyword = request.getParameter(value); Dave Ha, fair enough. But believe it or not, this is a copy/paste error. Here is the simplest xsp page that causes the problem (verbatim this time): = ?xml version=1.0? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:logic String keyword = request.getParameter(value); /xsp:logic content The 'value' parameter was: xsp:exprkeyword/xsp:expr /content /xsp:page = This xsp causes a NPE: java.lang.NullPointerException at org.apache.cocoon.www.examples.db1_xsp.(D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\cctest\cocoon-files\org/apache/cocoon/www/examples\db1_xsp.java:62) Line 62 is String keyword = request.getParameter(value); Sorry for the initial mis-post. Any ideas? Eric Everman - 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]
desperate with XMLForms invalida data message
Hello, all. It's been all day long and I'm still stuck with this. I can make the XMLForms Wizard demo to work nicely, but everytime I try to change just one property to test a custom solution, the 'invalid for data' message appears. I guess this is because of some mapping problems between forms and model bean. I tried initializing one of the variables in the bean to see if the value shows in the form, but no luck. Don't know what else I can try. I also remove most of the fields and forms on the wizard, keeping just one form with one name field. It doesn't work either...oh, god... Well, just a very very simple question. If I take the XMLForm Wizard and I do a minimal change: 1.- Change the name of the 'firstName' field in the 'userIdentity.xml' file to, for example 'theName'. I keep the initial value to 'Donald'. 2.- Change the getter and setter method in the model bean so I now have 'setTheName' and 'getTheName' methods. 3.- Change for validation in the schematron file, in the 'firstName' pattern, I change it for 'theName' too. Why now the Wizard is not working? Did I miss something? I'm pretty sure this has to be a mapping issue, but don't know how to fix it. Thanks in advance. ps: I could attach files or code if needed - 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]
Re: xsp request variable is not declaired
Your xsp page requires the cocoon processing instruction: ?cocoon-process type=xsp? I have also seen the xsp:page tag written: xsp:page language=java xmlns:xsp=http://www.apache.org/1999/XSP/Core; I am not clear if both are acceptable. Dave - Original Message - From: Eric Everman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 6:54 PM Subject: Re: xsp request variable is not declaired At 10/28/2002, you wrote: You do not appear to have declared `keyword'. i.e., try: String keyword = request.getParameter(value); Dave Ha, fair enough. But believe it or not, this is a copy/paste error. Here is the simplest xsp page that causes the problem (verbatim this time): = ?xml version=1.0? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:logic String keyword = request.getParameter(value); /xsp:logic content The 'value' parameter was: xsp:exprkeyword/xsp:expr /content /xsp:page = This xsp causes a NPE: java.lang.NullPointerException at org.apache.cocoon.www.examples.db1_xsp.(D:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\cctest\cocoon-files\org/apache/cocoon/www/exam ples\db1_xsp.java:62) Line 62 is String keyword = request.getParameter(value); Sorry for the initial mis-post. Any ideas? Eric Everman - 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]
Re: internalisation with schematron (XML-Form)
Many thanks ! I will review and apply the patch. ... now only if someone would be interested to write a HOWTO on using JAAS with Cocoon. Best, Ivelin - Original Message - From: Mohamed El-Refaey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 7:35 PM Subject: Re: internalisation with schematron (XML-Form) Hallo Ivelin, I already wrote a How To Document for this and uploaded it using Bugzilla . I hope it will be clear and easy to follow. and its Bug#14015. Thanx in advance Mohamed El-Refaey Ivelin Ivanov wrote: Mohamed, would you consider submitting your email as a how-to document in bugzilla. The question about i18n with XMLForm is popping constantly. Ivelin - Original Message - From: Mohamed El-Refaey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 27, 2002 4:08 PM Subject: Re: internalisation with schematron (XML-Form) Hi Michael , I faced the same problem and here is what I did when I read the mailing list regarding the i18n with Schematron validation error : 1- the XMLForm file is : xf:password ref=/password xf:captioni18n:textPassword/i18n:text/xf:caption xf:violations class=error/ /xf:password 2- the Schematron file : rule context=/password assert test=string-length(.) gt; 7 The Password Should be @ least 8 character. /assert /rule /pattern 3-the sitemap : map:transform type=xmlform label=xml/ map:transform src=xforms/stylesheets/translate.xsl/ map:act type=locale map:transform type=i18n map:parameter name=locale value={locale}/ /map:transform /map:act in which the translate.xsl file is the that what they r talking about in the mailing list : ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002; xmlns:i18n=http://apache.org/cocoon/i18n/2.0; xsl:template match=document document xsl:apply-templates/ /document /xsl:template xsl:template match=xf:violation xf:violation i18n:text xsl:value-of select=./ /i18n:text /xf:violation /xsl:template xsl:template match=node() priority=-1 xsl:copy xsl:copy-of select=@*/ xsl:apply-templates/ /xsl:copy /xsl:template /xsl:stylesheet and the Catalog file : message key=PasswordPassword/message I wish this will help u Mohamed Michael Bald wrote: Hi! I have a problem to translate the error-massages of the schematrons. I hope someone can give me a hint to solve my problem. I want to translate the Error Message of my pattern in the Schematron file. But I don´t know exactly how. I tried the way I found in the Mail archives of cocoon, but it didn´t work in my case. I hope someone can answer me how to include the internalisation in my schematron file. In the xml file I have following: xf:form xf:password ref=/password xf:caption i18n:textpassword_field/i18n:text /xf:caption xf:violation class=error/ /xf:form The schematron file has following pattern: rule context=/password assert test=string-lenght... Error_message that I want to translate! /assert /rule And the translation file has allready: ... message key=password_fieldPassword/message message key=The password is to long!/message ... sitemap: ... map:generate src= map:transform type=i18n map:parameter name=locale value={./locale}/ /map:transform map:transform type=xmlform label=xml map:transform src= ... I tried allready to switch the transformers...but it didn´t work. Hopefully someone can help me with this problem. Greetings Michael - 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] - 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]
Re: restricting access to cocoon
A few other people asked the same question recently. My personal believe is that security is orthogonal to Cocoon and belongs to the J2EE container. If you will have the time, please consider submitting a HOWTO patch to Cocoon's bugzilla on using Tomcat security with Cocoon. Regards, Ivelin - Original Message - From: icewind [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 28, 2002 1:37 PM Subject: restricting access to cocoon I want to be able to restrict access to my Cocoon-based application, either by IP range, login, or both. Is this something I can do easily in cocoon, or should I look into doing this using Tomcat? __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ - 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]
RE: CaheValidity toString()
Okay, I think I've found the problem with my aggregate caching. I have an xsp, and I use the cocoon:/ protocol to map:aggregate that xsp. Something like the usual: map:match pattern=foo map:aggregate element=site map:part src=cocoon:/from-an-xsp.xml/ /map:aggregate ... The symptom is that if I ask for http://foo?param=1 and then ask for that same url again, everything appears to be read from the cache. But, if I ask for http://foo?param=2 and then ask for http://foo?param=1 according the logs, Cocoon is re-aggregating the cached content of my xsp, rather than using the cached aggregated value. (This is a problem because I have quite a few transformations that take place after that aggregation, and they all get re-run needlessly). The problem appears to be that the aggregated content has a key which is based upon the src string (cocoon:/from-an-xsp.xml) which, in this case, is identical--it doesn't bother to ask the xsp for its key value. A workaround for this is to make the ContentAggregator key based upon the source's getLastModified() number (which, at least, is based upon hash of xsp's validity object [SitemapSource:refresh()]). In ContentAggregator: public long generateKey() { // ... if (current.getLastModified() == 0) { return 0; } else { // ... key += current.getLastModified(); // -- ADD THIS LINE } // ... Does the problem solution make sense? If so, should I submit a patch? Thanks, Steve -Original Message- From: Stephen Ng Sent: Monday, October 28, 2002 10:42 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: CaheValidity toString() I am running into this same problem (I think) but I'm confused as to what to do about it. I have xsp's with generateKey() and generateValidity()methods, and when I put the xsp in an aggregate, cocoon re-aggregates every time, instead of used the cached aggregated value. The symptom is that it says that the TimeStamp Validity is not the same for my aggregated component. I'm using my own CacheValidity, which does have a toString() method. I've tried replacing my xsp with the cacheable.xsp from the cocoon sample application, and I get the same problem--the aggregate isn't cached. Is there some other method I need to implement somewhere? Thanks, Steve -Original Message- From: David LAGARDERE [mailto:dlagardere;yahoo.fr] Sent: Friday, September 13, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: CaheValidity toString() Hello. Sorry if the following was documented. However, after many hours I spent on it, I found interesting to describe what I've found about Caching. I would like to have your opinion on a solution I've found to my troubles with Cacheability of aggregated content (see the previous mails I've sent). The problem I had was the fact that Cocoon didn't cache a StreamPipeline containing an aggregator composed of my own Cacheable Generator : the log told me the TimeStamp Validity of the Pipeline changed everytime I requested the page whereas my generator was always valid ! As each part of an aggregator is a SitemapSource instance, the key and the validity of the pipeline are built upon the SitemapSource last modification date. This date is the concatenation of the Pipeline Cached Key string value and the Pipeline Validity string value. The Pipeline Validity is a Map which associate a Component Cached Key with its validty. Its string representation is the string representation of each pair {key, value}, that is , a call to the toString() method on both Component cached key and Component validity objects. As a consequence, every validity may overload the toString() method returning a relevant value otherwise the returned value will be the memory address of the object, which of course, can't be taken as a relevant value. Please tell me if I'm wrong, but this is the only way I've found to have my CachingStreamPipeline cached ! David Lagardere ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - 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