I18n get rid of namespace declaration
Hi all, I am happily using the i18n transformer that really runs fine. My problem now is, the application receiving the output does not like the namespace declaration. Is there a way to get rid of it? I already tried appending a self transformer and useing the exclude-result-prefix. But in here, I need the copy-of ... and then it would not work. Can anybody help? Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Very Important: Deploy Servlets in the Cocoon Context
Hi, maybe this can help you as a starting point: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101920645513225w=2 Heike -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 2:00 AM To: [EMAIL PROTECTED] Subject: Very Important: Deploy Servlets in the Cocoon Context Hello All, I am in process of developing an automated client and server side form validation processing. I need to know how to invoke a Servlet in cocoon. The Servlet needs to be in the same context of cocoon (i.e. should be able to access the session and request objects with other pipelines). Could any one please provide me with the following? 1. Sample Sitemap entry 2. Any configurations (web,xml etc.) 3. Point me to some documentation (is there any ServletGenerator like JSP generator) Thanks in advance, Chiths - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logging of xslt output
Hi Vadim, thank you very much ;-) I extended LogTransformer to get the output I want. Mhh, I think I am on the way understanding the pattern on how to work with cocoon ;-)) Thanks, Heike -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 6:06 AM To: [EMAIL PROTECTED] Subject: RE: logging of xslt output From: Franosch, Heike [mailto:[EMAIL PROTECTED]] Hi all, is it possible to log the whole xslt output? Yes. Use log transformer. Vadim Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session handling cocoon - servlet - stylesheet solved
Hi Chiths, no, I did not touch web.xml. Heike -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 11:32 PM To: [EMAIL PROTECTED] Subject: RE: Session handling cocoon - servlet - stylesheet solved Thanks for the effort... 1 question though, did U have to register the servlet in the web.xml. Id so could U hust show the listing of your web.xml as well.. Regds, Chiths -Original Message- From: Franosch, Heike [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 1:56 AM To: [EMAIL PROTECTED] Subject: Session handling cocoon - servlet - stylesheet solved Hi all, thanks to Vadim, I got it running. My situation: I already have a servlet that outputs xml data and I want to use cocoon to select dynamically the suitable stylesheet. I have to put the session-id to the output document (inserting through xsl) and handling my session data in my servlet. It took some time for me to understand how all this should work (and a lot of patience from Vadim ;-) I attach my working code, just in case someone wants to do a similar thing and is in need of some example code. Things I had to be aware of: 1) It is important that my servlet is deployed under the same context path as cocoon, otherwise the session handling won't do. 2) The MyRequestAction is necessary to create a session and make it available to the sitemap, so the id can be accessed through the stylesheet and cat be manually attached to the servlet URL 3) I know this is not the normal way of using cocoon, but it works, and it is really great ;-)) Thank you all Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logging of xslt output
Hi all, is it possible to log the whole xslt output? Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: special characters for i18n
Really stupid question: How do you guys enter the special characters in utf-8 files? I am using the program recode on linux if I really need it ;-) Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session handling cocoon - servlet - stylesheet solved
Hi all, thanks to Vadim, I got it running. My situation: I already have a servlet that outputs xml data and I want to use cocoon to select dynamically the suitable stylesheet. I have to put the session-id to the output document (inserting through xsl) and handling my session data in my servlet. It took some time for me to understand how all this should work (and a lot of patience from Vadim ;-) I attach my working code, just in case someone wants to do a similar thing and is in need of some example code. Things I had to be aware of: 1) It is important that my servlet is deployed under the same context path as cocoon, otherwise the session handling won't do. 2) The MyRequestAction is necessary to create a session and make it available to the sitemap, so the id can be accessed through the stylesheet and cat be manually attached to the servlet URL 3) I know this is not the normal way of using cocoon, but it works, and it is really great ;-)) Thank you all Heike sessionTest.tar.gz Description: Binary data - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi Vadim, sorry, but I still just don't get it. There is a knot in my head I did some debugging and put some system.outs in the cocoon code. In CocoonServlet in the service method the session is null, so it does not come this far ... I don't understand it. 1) I create my session in the servlet, I have a sesison id and put it with the help of the encode method to my URL. If I just take this session id and call my servlet directly it finds the session just fine. If I use this same session id for cocoon the session is null 2) I use the session sample from the samples and take this session id for my call it works fine with my code. What is the difference between those two session ids? My session is valid but not found. The session from the examples is valid AND found. Is it correct that CocoonServlet is the starting point, where tomcat calls cocoon? If yes, then it must be something between my servlet and doing the transformations ... Do you have a hint where I can look at? Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi Vadim, What is your servlet - how/where it is deployed? What webapp context used to deploy this servlet? Waeehhh, so that's what it is, I am using the wrong context path. Deploying my servlet to the cocoon/WEB-INF makes it work ;-)) Thank you so much for your patience and knowledge, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi, sorry to say, but I have still one more problem. I was a bit too enthusiastic about seeing the session id on screen. I can access it from the stylesheet, but it does not get through to my servlet. It feels quite like the session is consumed on the way. Can this be possible? Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi Vadim, sorry to say, but I have still one more problem. I was a bit too enthusiastic about seeing the session id on screen. I can access it from the stylesheet, How do you do this - access the session from the stylesheet (XSL?)? Truthfully, it is just working when I access cocoon the second time. The session is created too late (?) to give the stylesheet access? When the jsessionid is in the URL it will be found fine. but it does not get through to my servlet. It feels quite like the session is consumed on the way. Can this be possible? Consumed? No. Unless you explicitly invalidate it, or disable cookies in the browser and do not use url rewriting. Can you give me a hint what class is handling the call to my servlet? As I have something like this in my sitemap map:generate src=http://localhost:8080/cocoon/servlet/testpackage.{../2}{requestQuery}/ it is a kind of Generator? So maybe I can find something. Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
:) Of course your servlet won't see session of the client, you invoke this servlet from the server, not from the browser. You must pass jsessionid request parameter manually to this servlet. I hope you already did this and have jsessionid in the {requestQuery}. If not, add it. Mhh, sorry to ask, but how is it done? I thought it would be something simply like: map:generate src=http://localhost:8080/cocoon/servlet/testpackage.{../2};jsessionid={ses sion-id}{requestQuery}/ But at this time the {session-id} ist not set. Do I have to write some code to perform this? Thanks, Heike --- Here again my whole environment: !-- test servlet -- map:pipelines map:pipeline map:match pattern=testpackage/*/* map:act type=request map:parameter name=parameters value=true/ map:generate src=http://localhost:8080/cocoon/servlet/testpackage.{../2};jsessionid={ses sion-id}{requestQuery}/ map:transform type=xslt src=testpackage/{../1}/{../2}.xsl map:parameter name=use-session-info value=true/ map:parameter name=session-id value={session-id}/ map:parameter name=session-is-new value={session-is-new}/ map:parameter name=session-available value={session-available}/ map:parameter name=no value={no}/ /map:transform /map:act map:serialize type=html encodingISO-8859-1/encoding /map:serialize /map:match /map:pipeline /map:pipelines - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi Vadim, thank you very much. It works now right the way I want it ;-)) Assuming that the action request returns you {session-id} parameter, you can write very simple action (request.getSession(true); return EMPTY_MAP;) and invoke it here like this: No, it does not return the session-id, but by extending the RequestParamAction it runs ok. Again, thank you very much. Really nice helping me out so much. I am absolutly happy now, because I really wanted to use cocoon in my project. You are all doing a very good job ;-)) Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Encoding question
Hi, thank you all for your help. You have all been right and it works fine now ;-) I am just wondering, is there some more documentation on the sitemap.xmap, when to use what element with what consequences? Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi all, sorry to repost my question, but I am still wondering should this work? I am creating a session in my servlet and want to access it from my stylesheet. I found this nice tag use-session-info. Does it work the way I am thinking it does or am I totally on the wrong way? The session-available is always false. Is it just a question of configuration? Thanks for any help. Heike I tried: map:pipelines map:pipeline map:match pattern=testpackage/*/* map:act type=request map:parameter name=parameters value=true/ map:generate src=http://localhost:8080/heike/servlet/testpackage.{../2}{re questQuery}/ /map:act map:transform type=xslt src=testpackage/{1}/{2}.xsl map:use-session-infotrue/map:use-session-info map:parameter name=session-id value={session-id}/ map:parameter name=session-is-new value={session-is-new}/ /map:transform map:serialize type=xml/ /map:match /map:pipeline /map:pipelines But I get no session. What's wrong? One more question: If I get this running, do I get the same session id as used from tomcat (this is essential)? Thank you very much for your help. Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi Vadim, thanks for your answer. I did a lot of more testing trying to figure it out. But, I still just can't get it run. This is wrong and never will work. You either specify this parameter when declaring transformer like this: map:transformer name=xslt src=org.apache... use-session-infotrue/use-session-info or here, but only supported syntax is map:parameter: map:transform type=xslt src=testpackage/{1}/{2}.xsl map:parameter name=use-session-info value=true/ I tried your suggestion. But with no success. When I query the parameters in my stylesheet the session-id is empty. use-session-info is true session-available is false When I do some ugly hardcoding and put the encoded URL to the xml and copy it to the output, and then reaccess my servlet the session is also null. Is it possible that the jsessionid is stripped off the URL from cocoon? Is there a way to get it? I have attached my coding. Maybe I am just using it wrong. I am really greatful for further help. Thanks, Heike -- Here is my snippet from sitemap: !-- test servlet -- map:pipelines map:pipeline !-- map:match pattern= map:redirect-to session=true uri=testpackage/nuance/SessionTest2/ /map:match -- map:match pattern=testpackage/*/* map:act type=request map:parameter name=parameters value=true/ map:generate src=http://localhost:8080/heike/servlet/testpackage.{../2}{requestQuery}/ map:transform type=xslt src=testpackage/{../1}/{../2}.xsl map:parameter name=use-session-info value=true/ map:parameter name=session-id value={session-id}/ map:parameter name=session-is-new value={session-is-new}/ map:parameter name=session-available value={session-available}/ map:parameter name=no value={no}/ /map:transform /map:act map:serialize type=html encodingISO-8859-1/encoding /map:serialize /map:match /map:pipeline /map:pipelines !-- transformer -- map:transformer name=xsltlogger=sitemap.transformer.xslt src=org.apache.cocoon.transformation.TraxTransformer pool-max=32 pool-min=16 pool-grow=4 use-request-parametersfalse/use-request-parameters use-browser-capabilities-dbfalse/use-browser-capabilities-db use-session-infotrue/use-session-info use-delifalse/use-deli /map:transformer SessionTest.java Description: Binary data SessionTest2.java Description: Binary data SessionTest.xsl Description: Binary data SessionTest2.xsl Description: Binary data - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Encoding question
Hi all, is it possible to set the output encoding? I always get a UTF-8, even if I set output encoding to iso-8859-1 in my stylesheet. Can I influence it somehow in the sitemap? Thanks, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
Hi, first of all thanks for your answers. Quite possibly the wrong way of doing things, but I use an XSP to grab the relevant session details then aggregate them so they are available to use in the stylesheet. maybe I try this one. But when this kind of problem arises, I usually ask myself: 1. Why do I need it in the stylesheet? 2. Is my stylesheet for -style- or am I programming with it? 3. Can't I resolve this problem once and for all during Generation? 4. Isn't this better solved with a Transformer, since it requires coding? Ok, maybe you are right, I am mixing things. But, what is styling? I try to use a different name for it: presentation. I have xml data and have to present it in voiceXML (using transformations ;-). And I need to cut my data into pieces, so I have to do callbacks to my data. Is this business or presentation? If I have html output I would not need it, so it is presentation! Ok, I am not using cocoon as it is meant to be ... Something different: I found the use-session-info. Can I use this to access the session? I tried: map:pipelines map:pipeline map:match pattern=testpackage/*/* map:act type=request map:parameter name=parameters value=true/ map:generate src=http://localhost:8080/heike/servlet/testpackage.{../2}{requestQuery}/ /map:act map:transform type=xslt src=testpackage/{1}/{2}.xsl map:use-session-infotrue/map:use-session-info map:parameter name=session-id value={session-id}/ map:parameter name=session-is-new value={session-is-new}/ /map:transform map:serialize type=xml/ /map:match /map:pipeline /map:pipelines But I get no session. What's wrong? One more question: If I get this running, do I get the same session id as used from tomcat (this is essential)? Thank you very much for your help. Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: accessing session context from stylesheet
On Mon, 15 Apr 2002, Franosch, Heike wrote: But I get no session. What's wrong? One more question: If I get this running, do I get the same session id as used from tomcat (this is essential)? Which version of Cocoon are you using? Sessions were broken in c2.0.2 IIRC, so I'm currently using c2.0.1. Yes, I am using c2.0.2. But changing to c2.0.1 didn't solve it. The session-available parameter is always false. I tried inserting a redirect with session=true. But, no Thanks, for your hint, Heike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
accessing session context from stylesheet
Hi all, I want to insert the session id to my URLs from within the stlyesheet and don't know how to access the context. I have seen a hint about the SessionValidationAction, but I just can't get it run. Has someone a nice tip or maybe some sample code how to achieve this? Thanks, Heike p.s. Sorry for repeating this question, but I didn't find a sufficient answer for this problem in the archives. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]