highlighting with Lucene
Hi, I have a question about using highlighting with Lucene. What I only want to do: start from an xml document, by example: flower This is a beautiful yellow flower /flower that I have first indexed in Lucene's index. And when making a query such : flower:yellow get an XML document from the following form: flower This is a beautiful emyellow/em flower /flower I don't want ANYsearch function, but just gain benefit from the highlight function in Lucene. At first glance, I think it's quite a easy task: 1°) Download the java classes from Maik Screiber, make the few modifications on Lucene's code. 2°) Compile the Highlight Transformer java class from article www.cocooncenter.org 3°) Write my sitemap, as written in the same article: map:transformer logger=sitemap.transformer.highlight name=highlight pool-grow=2 pool-max=16 pool-min=2 src=nl.datagram.cocoon.transformation.HighlightTransformer/ map:match pattern=flora map:generate type=file src=flora.xml/ map:transform type=highlight / map:serialize/ /map:match And when pointing to the url: http://localhost:8080/cocoon/flora?query=flower:yellow I should have the desired document: flower This is a beautiful emyellow/em flower /flower Is this right, or highlighting is a much more difficult task? Thanks for your response, Cyril. - 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]
variable i not found in XSP!
Hi, Since yesterday, I'm still stuck on the following problem: I can't list the items contained in a session's attribute of type Vector: Always the same following error is thrown: Line 236, column 59: variable i not found in class org.apache.cocoon.www.mount.essai.session3_xsp Below is my code: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true xsp:structure xsp:includejava.util.Vector/xsp:include /xsp:structure content xsp:logic Vector items = (Vector)xsp-session:get-attribute name=cart.items/; if (items == null) items = new Vector(10,5); items.add(xsp-request:get-parameter name=item/); session.setAttribute(cart.items,items); the snippet below works fine * if (!xsp-session:is-new/) { ul bThe list of items is:/b xsp-session:get-attribute name=cart.items default=not set/ /ul } *** the snippet below doesn't work :-(( * if (!xsp-session:is-new/) { ul for (int i = 0; i lt; items.size(); i++) { lixsp:expritems.get(i)/xsp:expr/li } /ul } /xsp:logic /content /xsp:page SOmeone one can help me, please? Regards, Cyril. - 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: variable i not found in XSP!
Thanks for your help Chris! It's working fine now! Cyril. On 06.Feb.2003 -- 05:09 PM, Cyril Vidal wrote: Hi, Since yesterday, I'm still stuck on the following problem: I can't list the items contained in a session's attribute of type Vector: Always the same following error is thrown: Line 236, column 59: variable i not found in class org.apache.cocoon.www.mount.essai.session3_xsp Below is my code: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true xsp:structure xsp:includejava.util.Vector/xsp:include /xsp:structure content xsp:logic Vector items = (Vector)xsp-session:get-attribute name=cart.items/; if (items == null) items = new Vector(10,5); items.add(xsp-request:get-parameter name=item/); session.setAttribute(cart.items,items); if (!xsp-session:is-new/) { ul When nesting logic inside markup inside logic, new xsp:logic tags are needed! IOW, you can put markup inside logic without manually switching to e.g. text mode. That is done automatically. But once you are in text mode, logic needs to be escaped again. HTH. xsp:logic for (int i = 0; i lt; items.size(); i++) { lixsp:expritems.get(i)/xsp:expr/li } /xsp:logic /ul } /xsp:logic /content /xsp:page 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] - 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 session logicsheet
Hi Roman, Indeed I've done this: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true html xsp-session:set-attribute name=cart.itemsxsp-request:get-parameter name=item//xsp-session:set-attribute bThe list of items is:/b xsp-session:get-attribute name=cart.items default=not set/ br/ bYour session was created:/b xsp-session:get-creation-time as=string/ /html /xsp:page My problem is the following: I would like to add items to the attribute's session 'cart.items'. For the moment, the preceding code doesn't do this task. When I call http://localhost:8080/cocoo/mount/try/session.xsp?item=3 I receive the following html result: The list of items is: 3 Your session was created: Wed Feb 05 13:41:32 CET 2003 when I then call http://localhost:8080/cocoo/mount/try/session.xsp?item=5 The result is the following: The list of items is: 5 Your session was created: Wed Feb 05 13:41:32 CET 2003 and of course, I would like The list of items is: 3, 5 Your session was created: Wed Feb 05 13:41:32 CET 2003 What i would like to know : is it possible to achieve this task by using Session Logicsheet by itself, does this Logicsheet provides this functionnality? If not, the alternative is also to use actions, as suggested in this thread before? Is a built-in action available for this, or do I have to build one from scratch? Any help or hint would help me, Thanks, Cyril. Hi Cyril, try adding xmlns:session=http://apache.org/xsp/session/2.0; namespace to your xsp page. Then have a look at the generated code. Basically you should see a java variable (object) named session, with it you can do what you want. No need to declare it, cocoon does it for you. Roman -Original Message- From: Cyril Vidal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 11:01 AM To: [EMAIL PROTECTED] Subject: Re: xsp session logicsheet Thanks for you response. hum, I guess actions are still a little bit too complex for me, regarding my knowledge of Cocoon... Isn't it really possible to add merely values to the same session's attribute with the ESQL logicsheet? It sounds odd... Cyril. Hi Cyril Why don't use an action, I think it's better not to have too much Java code in your xsp-pages. In an action you can take your code as it is. Cheers Beat Hi, I would like to deal with session through xsp, and serve as far as possible the same goal as with the following servlet: e.g put all the parameters named 'item' in the object of type Vector 'items' bound to the current session, so that it would be possible to list at any time all of the items chosen so far by the client in his session. public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(text/html); PrintWriter out = res.getWriter(); // Get the current session object, create one if necessary. HttpSession session = req.getSession(true); // Cart items are maintained in the session object. Vector items = (Vector)session.getAttribute(cart.items); if (items == null) { items = new Vector(10,5);} String item = req.getParameter(item); items.add(item); session.setAttribute(cart.items,items); out.println(HTMLHEADTITLESessionTracker modifie/TITLE/HEAD); out.println(BODYH1Session Tracking Demo/H1); // Print the current cart items. out.println(You currently have the following items in your cart:BR); if (items == null) { out.println(BNone/B); } else { out.println(UL); for (int i = 0; i items.size(); i++) { out.println(LI + items.get(i)); } out.println(/UL); } out.println(/BODY/HTML); } } Below is the xsp i've written for the moment,: this is working fine, but does not do what I want: because each time the client chooses an item and pass it via the parameter 'item', instead of being added in the object cart.items, its value overrides this of the preceding parameter. ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true html xsp-session:set-attribute name=cart.itemsxsp-request:get-parameter name=item//xsp-session:set-attribute bYou currently have the following items in your cart:/b xsp-session:get-attribute name=cart.items/ br/ bYour session was created:/b xsp-session:get-creation-time as=string/ /html /xsp:page Some of you would know how I can improve my code? Indeed, I would like cart.items to be like
Re: xsp session logicsheet
Hello Christian, Thanks again for your help and your availibility. Of course, I meant Session logicsheet and not ESQL one...Sorry... I've tried to launch the code you've suggested: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true xsp:logic Object items = xsp-session:get-attribute name=cart.items/; if (items == null) items = new Vector(10,5); ((Vector) items).add(xsp-request:get-parameter name=item/); request.getSession().setAttribute(items); // logicsheet only supports setting Strings objects :-( // thus do it manually. /xsp:logic /xsp:page But, I receive following error message: type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling session3_xsp: Line 78, column 6: illegal start of type Line 79, column 6: illegal start of type Line 88, column 24: expected Line 88, column 14: cannot access class getSession; file request\getSession.class not found Line 73, column 47: variable session not found in class org.apache.cocoon.www.mount.essai.session3_xsp Line 0, column 0: 5 errors sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling session3_xsp: Line 78, column 6: illegal start of type Line 79, column 6: illegal start of type Line 88, column 24: expected Line 88, column 14: cannot access class getSession; file request\getSession.class not found Line 73, column 47: variable session not found in class org.apache.cocoon.www.mount.essai.session3_xsp Line 0, column 0: 5 errors I've cheked out in the source code of the xsp file generated: 68 /* User Class Declarations */ 70 Object items = 72 ( 73 XSPSessionHelper.getSessionAttribute(session, 74 String.valueOf(cart.items), 75 null) 76) 77 ; 78 if (items == null) items = new Vector(10,5); 79 ((Vector) items).add( 81 ( 82 (XSPRequestHelper.getParameter(objectModel, 83 item, null, 84null, 85null)) 86) 87); I can't figure out why the line 78 throws an illegal start type...Do you see what can be wrong? Regards, Cyril. PS: In the code, you've written: request.getSession().setAttribute(items); shall we not write instead request.getSession().setAttribute(cart-item, items); as in the traditional java servlet? I'm not sure... - 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 session logicsheet
I think I'm on the point of being successful with my business. But I still have one question, considering the following short code and especially the uncommented snippet: (serves to retrieve and display all the items of the current session) ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true xsp:structure xsp:includejava.util.Vector/xsp:include /xsp:structure content xsp:logic Object items = xsp-session:get-attribute name=cart.items/; if (items == null) items = new Vector(10,5); ((Vector) items).add(xsp-request:get-parameter name=item/); session.setAttribute(cart.items,items); /**Error here: method get() and variable i are not known from Cocoon's servlet ul for (int i=0; ilt;items.size(); i++) { lixsp:expritems.get(i)/xsp:expr/li } /ul **/ /xsp:logic /content /xsp:page Why do I receive the following two errors: Line 174, column 58: variable i not found in class org.apache.cocoon.www.mount.essai.session3_xsp Line 174, column 54: method get() not found in class java.lang.Object Is the syntax I am using here not the same as the following, which is OK? elements xsp:logic for (int i=1; ilt;11; i++) { elementxsp:expri/xsp:expr/element } /xsp:logic /elements Which is the difference between them? Regards, Cyril - Original Message - From: Christian Haul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 3:19 PM Subject: Re: xsp session logicsheet On 05.Feb.2003 -- 02:56 PM, Cyril Vidal wrote: Hello Christian, Thanks again for your help and your availibility. Of course, I meant Session logicsheet and not ESQL one...Sorry... I've tried to launch the code you've suggested: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true The class Vector is unknown here. Add xsp:structure xsp:includejava.util.Vector/xsp:include /xsp:structure in order to create an import statement. Add some markup here, otherwise the following code won't be inside the generate() method but would be expected to be a valid method declaration. content xsp:logic Object items = xsp-session:get-attribute name=cart.items/; if (items == null) items = new Vector(10,5); ((Vector) items).add(xsp-request:get-parameter name=item/); request.getSession().setAttribute(items); // logicsheet only supports setting Strings objects :-( // thus do it manually. /xsp:logic /content /xsp:page Regards, Cyril. PS: In the code, you've written: request.getSession().setAttribute(items); shall we not write instead request.getSession().setAttribute(cart-item, items); as in the traditional java servlet? Absolutely, you are right. And the other poster is also right that there is a variable named session if the session logicsheet is used. Thus it suffices to write session.setAttribute(cart.items, items); Chris. BTW when writing to the list you don't need to CC me -- it will end up in the same mailbox anyway (as duplicates). -- 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] - 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 session logicsheet
Hi Roman, thank you very much for your reponse. I know that in theory, using actions is better than simply mixing pure Java code in XSP pages. But it's true that I must go quite quickly, and just to have an idea of how sessions work in Cocoon, I just would to have a first try with the second solution. Of course, I have in project to have a deeper understanding of what goes on under the hood with actions, but a little bit latter. AFAIK, this concept is not really simple to figure out... The solution you suggested to me works well, thanks: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true xsp:structure xsp:includejava.util.Vector/xsp:include /xsp:structure content xsp:logic Vector items = (Vector)xsp-session:get-attribute name=cart.items/; if (items == null) items = new Vector(10,5); items.add(xsp-request:get-parameter name=item/); session.setAttribute(cart.items,items); bThe list of items is:/b xsp-session:get-attribute name=cart.items default=not set/ /xsp:logic /content /xsp:page But the result is of the following form: The list of items is: 1336364336433643323643 and I would like better it would be of this form: The list of items is: .133636 433 643 3643 323643 So instead of the following code, bThe list of items is:/b xsp-session:get-attribute name=cart.items default=not set/ I' ve tried the following one: bThe list of items is:/b ul for (int i = 0; i lt; items.size(); i++) { lixsp:expritems.get(i)/xsp:expr/li } /ul I have the following error: Line 226, column 59: variable i not found in class org.apache.cocoon.www.mount.essai.session3_xsp Christian Haul has already taken pains (one more time) to explain me what went wrong, but I'm afraid I've not all understood. I've casted the former Object items onto Vector one, as suggested, but it doesn't seem to be sufficient. Have any idea? Regards, Cyril. Hi Cyril, you do not have to use actions if you do not want :-) As I said, when you use session namespace, there is always a variable session there in the generated java code. You can access this session either directly in xsp page from within xsp:logic tags, or you can write your own taglib. This taglib can then implicitly use session variable, though it will never be declared there. What I propose to you is a kind of dirty programming style, but as I understood you want a quick solution. Try something like this, you have to experiment and always look at the generated code: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true html xsp:logic // beginning of the java code try { // Cart items are maintained in the session object. Vector items = (Vector)session.getAttribute(cart.items); if (items == null) { items = new Vector(10,5);} String item = req.getParameter(item); items.add(item); session.setAttribute(cart.items,items); /xsp:logic bThe list of items is:/b xsp-session:get-attribute name=cart.items default=not set/ /html /xsp:page Roman -Original Message- From: Cyril Vidal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 1:53 PM To: [EMAIL PROTECTED] Subject: Re: xsp session logicsheet Hi Roman, Indeed I've done this: ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true html xsp-session:set-attribute name=cart.itemsxsp-request:get-parameter name=item//xsp-session:set-attribute bThe list of items is:/b xsp-session:get-attribute name=cart.items default=not set/ br/ bYour session was created:/b xsp-session:get-creation-time as=string/ /html /xsp:page My problem is the following: I would like to add items to the attribute's session 'cart.items'. For the moment, the preceding code doesn't do this task. When I call http://localhost:8080/cocoo/mount/try/session.xsp?item=3 I receive the following html result: The list of items is: 3 Your session was created: Wed Feb 05 13:41:32 CET 2003 when I then call http://localhost:8080/cocoo/mount/try/session.xsp?item=5 The result is the following: The list of items is: 5 Your session was created: Wed Feb 05 13:41:32 CET 2003 and of course, I would like The list of items is: 3, 5 Your session was created: Wed Feb 05 13:41:32 CET 2003 What i would like to know : is it possible to achieve this task by using Session Logicsheet by itself, does this Logicsheet provides this functionnality? If not, the alternative is also to use actions, as suggested in this thread before? Is a built-in action available for this, or do I have to build one
xsp session
Hi, I would like to deal with session through xsp, and serve as far as possible the same goal as with the following servlet: e.g put all the parameters named 'item' in the object of type Vector 'items' bound to the current session, so that it would be possible to list at any time all of the items chosen so far by the client in his session. public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(text/html); PrintWriter out = res.getWriter(); // Get the current session object, create one if necessary. HttpSession session = req.getSession(true); // Cart items are maintained in the session object. Vector items = (Vector)session.getAttribute(cart.items); if (items == null) { items = new Vector(10,5);} String item = req.getParameter(item); items.add(item); session.setAttribute(cart.items,items); out.println(HTMLHEADTITLESessionTracker modifie/TITLE/HEAD); out.println(BODYH1Session Tracking Demo/H1); // Print the current cart items. out.println(You currently have the following items in your cart:BR); if (items == null) { out.println(BNone/B); } else { out.println(UL); for (int i = 0; i items.size(); i++) { out.println(LI + items.get(i)); } out.println(/UL); } out.println(/BODY/HTML); } } Below is the xsp i've written for the moment,: this is working fine, but does not do what I want: because each time the client chooses an item and pass it via the parameter 'item', instead of being added in the object cart.items, its value overrides this of the preceding parameter. ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; create-session=true html xsp-session:set-attribute name=cart.itemsxsp-request:get-parameter name=item//xsp-session:set-attribute bYou currently have the following items in your cart:/b xsp-session:get-attribute name=cart.items/ br/ bYour session was created:/b xsp-session:get-creation-time as=string/ /html /xsp:page Some of you would know how I can improve my code? Indeed, I would like cart.items to be like a Vector, so that it would be possible to put merely values onto it. Thanks in advance for your help, Cyril. - 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]
How can the result of a pipeline be a parameter for a transformation in another pipeline?
Hello, I would like to retrieve the language of the user's browser, so that I could call the I18n Trasnformer in the right way (by passing the locales's value equal to the browser's language). To retrieve the language set up in the browser, I've used the Request Generator, and applied the following simple stylesheet to it: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:req=http://xml.apache.org/cocoon/requestgenerator/2.0; xsl:template match=/ xsl:value-of select=//req:requestHeaders/req:header[@name='accept-language']/ /xsl:template /xsl:stylesheet And this is working fine. By example, for my browser, the result is 'fr'. But now, I don't know what really to do with this value: I would like to use it as a parameter for a I18nTransformation in another pipeline. Do you know how this can be achieved? Thanks for your help, Cyril. - 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: How can the result of a pipeline be a parameter for a transformation in another pipeline?
Thanks for your help Konstantin! It's OK with LocaleAction. Regards, Cyril. - Original Message - From: Konstantin Piroumian [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 31, 2003 4:12 PM Subject: Re: How can the result of a pipeline be a parameter for a transformation in another pipeline? From: Cyril Vidal [EMAIL PROTECTED] Hello, I would like to retrieve the language of the user's browser, so that I could call the I18n Trasnformer in the right way (by passing the locales's value equal to the browser's language). Simply use the LocaleAction as it is done in i18n samples. AFAIK, you can setup it to use only the browser's locale and not take into account request params, session attributes or cookies. But I'm sure you'll need to allow users to change to language on fly or retain it in a cookie on the client side to serve the last preferred language of the user. In all this cases LocaleAction will help you a lot. -- Konstantin To retrieve the language set up in the browser, I've used the Request Generator, and applied the following simple stylesheet to it: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:req=http://xml.apache.org/cocoon/requestgenerator/2.0; xsl:template match=/ xsl:value-of select=//req:requestHeaders/req:header[@name='accept-language']/ /xsl:template /xsl:stylesheet And this is working fine. By example, for my browser, the result is 'fr'. But now, I don't know what really to do with this value: I would like to use it as a parameter for a I18nTransformation in another pipeline. Do you know how this can be achieved? Thanks for your help, Cyril. - 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: How can the result of a pipeline be a parameter for a transformation in another pipeline?
Hello Christian, First, thanks for your help! I think I've done what you told me concerning the input module. And in fact, I've just changed the value of the parameter 'locale', given the successfull pattern using localeAction: localeAction *** map:pipeline map:act type=locale map:match pattern=localeAction map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsINT.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=i18n map:parameter name=locale value={../locale}/ /map:transform map:serialize type=html/ /map:match /map:act *input module * map:match pattern=inputModule map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsINT.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=i18n map:parameter name=locale value={request-header:accept-language}/ /map:transform map:serialize type=html/ /map:match /map:pipeline but unfortunately, I receive the following error message, that I didn't have with the preceding localAction: type fatal message Unable to locate resource: messages description org.apache.cocoon.ProcessingException: Unable to locate resource: messages: org.apache.avalon.framework.component.ComponentException: Unable to locate resource: messages sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace Is it normal? Thanks again for your help, Regards, Cyril. - Original Message - From: Christian Haul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 31, 2003 4:23 PM Subject: Re: How can the result of a pipeline be a parameter for a transformation in another pipeline? On 31.Jan.2003 -- 04:07 PM, Cyril Vidal wrote: Hello, I would like to retrieve the language of the user's browser, so that I could call the I18n Trasnformer in the right way (by passing the locales's value equal to the browser's language). To retrieve the language set up in the browser, I've used the Request Generator, and applied the following simple stylesheet to it: Starting with version 2.0.4 you could try {request-header:accept-language} for that. See input modules in concepts and javadocs. 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] - 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]
i18n translation with attributes: 2 questions
Hi, If some of you would have some tips for these two questions, I would be very grateful: 1°) Under Cocoon 2.0.4 and Windows 2000: I use a i18n Transformer (with french and english dictionnaries), and all's working fine with elements' translation. But not for attributes. I have basicaly a HTML form with a submit button. As described in the Cocoon's doc, I write the following in my stylesheet to be translated: input TYPE=submit NAME=submit i18n:attr=value/ and in my French dictionary: message key=valueSoumettre la requête/message in my English dictionary: message key=valueSubmit the request/message WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see the correct value of the button, ie: 'Soumettre la requête'. But when I call english translation with http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the same french message, although I've specified the english version for this button's value in the english dictionary. Could it have to handle with the xerces's bug described in the doc?? 2°) In my styleshhet, I've got a second hidden input area. For each one, I have to use i18n:attr=value in the sitemap and message key=valueSome text/message in the dictionary, I want to internationalise both (That's I want to do precisely...). So, Is it possible to make a difference between them? FORM METHOD=GET ACTION= bi18n:textchoix/i18n:text/b a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a href=?locale=eni18n:textchoix_langue_en/i18n:text/a input type=hidden name=locale value=fr/ //First attribute value to internationalise = fr in french and en in english fieldset class=etiquette style=padding: 10px; font-weight:bold; font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px; legendi18n:texttrier/i18n:text/legend input TYPE=radio NAME=tri VALUE=nomi18n:textboutonNom/i18n:text/input input TYPE=radio NAME=tri VALUE=prénomi18n:textboutonPrenom/i18n:text/input input TYPE=radio NAME=tri VALUE=titrei18n:textboutonTitre/i18n:text/input input TYPE=radio NAME=tri VALUE=organismei18n:textboutonOrganisme/i18n:text/input /fieldset br/ input TYPE=submit NAME=submit i18n:attr=value/ //Second attribute ton internationalise: Soumettre la requête in French Submit the request in English /FORM thanks in advance for your repsnses, Best, Cyril. - 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: i18n translation with attributes: 2 questions
Hello Joerg, Thank you very much for your response. I think I've done what you told me. in my stylesheet: input type=submit name=submit i18n:attr=name/ and in my dictionaries french: message key=submitSoumettre la requête/message english: message key=submitSubmit the request/message But unfortunately (I've stopped and restarded Tomcat), I always have the same french message on the button, even when I ask for the english version! Did I still make something wrong? Regards, Cyril. Hello Cyril, Cyril Vidal wrote: Hi, If some of you would have some tips for these two questions, I would be very grateful: 1°) Under Cocoon 2.0.4 and Windows 2000: I use a i18n Transformer (with french and english dictionnaries), and all's working fine with elements' translation. But not for attributes. I have basicaly a HTML form with a submit button. As described in the Cocoon's doc, I write the following in my stylesheet to be translated: input TYPE=submit NAME=submit i18n:attr=value/ and in my French dictionary: message key=valueSoumettre la requête/message in my English dictionary: message key=valueSubmit the request/message WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see the correct value of the button, ie: 'Soumettre la requête'. But when I call english translation with http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the same french message, although I've specified the english version for this button's value in the english dictionary. Could it have to handle with the xerces's bug described in the doc?? No, it works a bt different with attributes. In i18n:attr=... you specify the attributes, that shell be translated. You have value in your above example, but there is no attribute value, only TYPE and NAME. So change it to i18n:attr=NAME to get the value of the attribute NAME translated or add an attribute value, which is used for the text on the button AFAIK. Furthermore the value of the attribute to translate is the key (above example: NAME=submit = key = submit). This key must be used in the dictionary (= message key=submit/). With the Xerces bug you won't get anything as output I think. At least you would have a stack trace in the log files. 2°) In my styleshhet, I've got a second hidden input area. For each one, I have to use i18n:attr=value in the sitemap and message key=valueSome text/message in the dictionary, I want to internationalise both (That's I want to do precisely...). So, Is it possible to make a difference between them? FORM METHOD=GET ACTION= bi18n:textchoix/i18n:text/b a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a href=?locale=eni18n:textchoix_langue_en/i18n:text/a input type=hidden name=locale value=fr/ //First attribute value to internationalise = fr in french and en in english Knowing the above at 1° this is no longer a problem: input type=hidden name=locale value=locale i18n:attr=value/ ---this is the key^^ dictionary: message key=localeen/message (or fr in the french dictionary) fieldset class=etiquette style=padding: 10px; font-weight:bold; font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px; legendi18n:texttrier/i18n:text/legend input TYPE=radio NAME=tri VALUE=nomi18n:textboutonNom/i18n:text/input input TYPE=radio NAME=tri VALUE=prénomi18n:textboutonPrenom/i18n:text/input input TYPE=radio NAME=tri VALUE=titrei18n:textboutonTitre/i18n:text/input input TYPE=radio NAME=tri VALUE=organismei18n:textboutonOrganisme/i18n:text/input /fieldset br/ input TYPE=submit NAME=submit i18n:attr=value/ //Second attribute ton internationalise: Soumettre la requête in French Submit the request in English Same here: input TYPE=submit NAME=submit value=submit i18n:attr=value/ dictionary: message key=submitSoumettre la requête/message /FORM thanks in advance for your repsnses, Best, Cyril. Regards Joerg - 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: i18n translation with attributes: 2 questions
Yes, of course;-)) it runs well now.. Thanks for your help, Joerg. PS:Something quite strange is happening: I see the answers of my messages but not my messages themselves on the mailing-list... - Original Message - From: Joerg Heinicke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 30, 2003 8:33 PM Subject: Re: i18n translation with attributes: 2 questions As I mentioned in my last mail, I guess you must use the value attribute for changing the text on the button: input type=submit value=submit i18n:attr=value/ The name is only interesting for DOM processings like document.form[0].elements[name of the form element]. Regards, Joerg Cyril Vidal wrote: Hello Joerg, Thank you very much for your response. I think I've done what you told me. in my stylesheet: input type=submit name=submit i18n:attr=name/ and in my dictionaries french: message key=submitSoumettre la requête/message english: message key=submitSubmit the request/message But unfortunately (I've stopped and restarded Tomcat), I always have the same french message on the button, even when I ask for the english version! Did I still make something wrong? Regards, Cyril. Hello Cyril, Cyril Vidal wrote: Hi, If some of you would have some tips for these two questions, I would be very grateful: 1°) Under Cocoon 2.0.4 and Windows 2000: I use a i18n Transformer (with french and english dictionnaries), and all's working fine with elements' translation. But not for attributes. I have basicaly a HTML form with a submit button. As described in the Cocoon's doc, I write the following in my stylesheet to be translated: input TYPE=submit NAME=submit i18n:attr=value/ and in my French dictionary: message key=valueSoumettre la requête/message in my English dictionary: message key=valueSubmit the request/message WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see the correct value of the button, ie: 'Soumettre la requête'. But when I call english translation with http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the same french message, although I've specified the english version for this button's value in the english dictionary. Could it have to handle with the xerces's bug described in the doc?? No, it works a bt different with attributes. In i18n:attr=... you specify the attributes, that shell be translated. You have value in your above example, but there is no attribute value, only TYPE and NAME. So change it to i18n:attr=NAME to get the value of the attribute NAME translated or add an attribute value, which is used for the text on the button AFAIK. Furthermore the value of the attribute to translate is the key (above example: NAME=submit = key = submit). This key must be used in the dictionary (= message key=submit/). With the Xerces bug you won't get anything as output I think. At least you would have a stack trace in the log files. 2°) In my styleshhet, I've got a second hidden input area. For each one, I have to use i18n:attr=value in the sitemap and message key=valueSome text/message in the dictionary, I want to internationalise both (That's I want to do precisely...). So, Is it possible to make a difference between them? FORM METHOD=GET ACTION= bi18n:textchoix/i18n:text/b a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a href=?locale=eni18n:textchoix_langue_en/i18n:text/a input type=hidden name=locale value=fr/ //First attribute value to internationalise = fr in french and en in english Knowing the above at 1° this is no longer a problem: input type=hidden name=locale value=locale i18n:attr=value/ ---this is the key^^ dictionary: message key=localeen/message (or fr in the french dictionary) fieldset class=etiquette style=padding: 10px; font-weight:bold; font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px; legendi18n:texttrier/i18n:text/legend input TYPE=radio NAME=tri VALUE=nomi18n:textboutonNom/i18n:text/input input TYPE=radio NAME=tri VALUE=prénomi18n:textboutonPrenom/i18n:text/input input TYPE=radio NAME=tri VALUE=titrei18n:textboutonTitre/i18n:text/input input TYPE=radio NAME=tri VALUE=organismei18n:textboutonOrganisme/i18n:text/input /fieldset br/ input TYPE=submit NAME=submit i18n:attr=value/ //Second attribute ton internationalise: Soumettre la requête in French Submit the request in English Same here: input TYPE=submit NAME=submit value=submit i18n:attr=value/ dictionary: message key=submitSoumettre la requête/message /FORM thanks in advance for your repsnses, Best, Cyril. Regards Joerg - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org
Re: i18n + XSLT transformation
Thanks for your help Joerg!! Yes, I found a solution to my problem but I can't really explain it... This runs well: map:match pattern=essai1 map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsINT.xsl type=xslt-with-parameters/ map:transform type=i18n /map:transform map:serialize type=html/ /map:match with the declaration of transformer xslt-with-param as bellow: map:transformer name=xslt-with-parameters src=org.apache.cocoon.transformation.TraxTransformer use-request-parameterstrue/use-request-parameters /map:transformer but this does'nt work: map:match pattern=essai1 map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsINT.xsl map:parameter name=use-request-parameters value=true/ map:transform type=i18n /map:transform map:serialize type=html/ /map:match map:transform type=i18n /map:transform map:serialize type=html/ /map:match I thought both syntaxes were valid, aren't they? Regards, Cyril. - Original Message - From: Joerg Heinicke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 30, 2003 8:36 PM Subject: Re: i18n + XSLT transformation Hello Cyril, found this message just now (I still have nearly 500 unread Cocoon messages since the weekend). Did you solve the problem? The sitemap looks ok, maybe the namespace declaration in the XSLT is wrong? Joerg Cyril Vidal wrote: Hi, Just to go more deeply into Cocoon's comprehension, I've yesterday built a little example with the load of two differents stylesheets (participantsFR.xsl and participantsEN.xsl) depending of the value of a parameter passed in HTTP Request, and with the help of this mailing-list, I've achieved this. Now, I would like to perform exactly the same task, but by another way: via the use of i18n Transformer. To translate a static xml file, I've no difficult, and the following except of sitemap.xmap, (supposed I've created a catalogue directory named translation with message_en.xml and message_fr.xml) works well: map:match pattern=try_it map:generate src=documents/essai.xml/ map:transform type=i18n map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=xml/ /map:match The following adresses http://localhost:8080/cocoon/hellococoon/try_it?locale=fr and http://localhost:8080/cocoon/hellococoon/try_it?locale=en display the specified translation. But now, I would like to mix a XSLT transformation with the i18n Transformation. (I mean, the different i18n:texttext to be translated/i18n:text appear now in the XSLT file participantsIN.xsl) To perform this task, I've tried the following code (overlapping the i18n transformation inside the XSLT transformation...): map:match pattern=try_it1 map:parameter name=parameters value=true/ map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsIN.xsl map:transform type=i18n map:parameter name=use-request-parameters value=true/ /map:transform /map:transform map:serialize type=html/ /map:match But when I try by example the following adress: http://localhost:8080/cocoon/hellococoon/try_it1?locale=en I receive no error message but nor is the i18n transformation done: I the HTML result, I have all my i18n:texttext to be translated/i18n:text elements, without any effective translation. Waht I have to change in sitemap to fix the problem? Thanks again for your help, Cyril. - 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]
i18n + XSLT transformation
Hi, Just to go more deeply into Cocoon's comprehension, I've yesterday built a little example with the load of two differents stylesheets (participantsFR.xsl and participantsEN.xsl) depending of the value of a parameter passed in HTTP Request, and with the help of this mailing-list, I've achieved this. Now, I would like to perform exactly the same task, but by another way: via the use of i18n Transformer. To translate a static xml file, I've no difficult, and the following except of sitemap.xmap, (supposed I've created a catalogue directory named translation with message_en.xml and message_fr.xml) works well: map:match pattern=try_it map:generate src=documents/essai.xml/ map:transform type=i18n map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=xml/ /map:match The following adresses http://localhost:8080/cocoon/hellococoon/try_it?locale=fr and http://localhost:8080/cocoon/hellococoon/try_it?locale=en display the specified translation. But now, I would like to mix a XSLT transformation with the i18n Transformation. (I mean, the different i18n:texttext to be translated/i18n:text appear now in the XSLT file participantsIN.xsl) To perform this task, I've tried the following code (overlapping the i18n transformation inside the XSLT transformation...): map:match pattern=try_it1 map:parameter name=parameters value=true/ map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsIN.xsl map:transform type=i18n map:parameter name=use-request-parameters value=true/ /map:transform /map:transform map:serialize type=html/ /map:match But when I try by example the following adress: http://localhost:8080/cocoon/hellococoon/try_it1?locale=en I receive no error message but nor is the i18n transformation done: I the HTML result, I have all my i18n:texttext to be translated/i18n:text elements, without any effective translation. Waht I have to change in sitemap to fix the problem? Thanks again for your help, Cyril. - 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]
simple question about RequestSelector
Dear all, I would like to process an URI of the following type: http://localhost:8080/cocoon/hellococoon?langue=anglaiscritere=organisme The first parameter's role is to select a specified stylesheet: langue=anglais - select participantsEN.xslt langue=francais - select participantsFR.xslt while parameter 'critere' is used to pass a parameter to the selectionned stylesheet. If I only take care about the parameter 'langue', the following code's snippet using RequestSelector works fine: map:match pattern= map:generate src=documents/participants.xml/ map:select type=request map:parameter name=parameter-name value=langue/ map:when test=francais map:transform src=stylesheets/participantsFR.xsl /map:transform /map:when map:when test=anglais map:transform src=stylesheets/participantsEN.xsl/ /map:when map:otherwise map:transform src=stylesheets/participantsFR.xsl/ /map:otherwise /map:select map:serialize type=html/ /map:match But When I want to deal with the second parameter too, (by adding the following instructions): map:parameter name=use-request-parameters value=true/ map:parameter name=tri value={critere}/ I have some problems, indeed I receive no error messag but nothing is happening. I use the the following code: map:match pattern= map:generate src=documents/participants.xml/ map:select type=request map:parameter name=parameter-name value=langue/ map:when test=francais map:transform src=stylesheets/participantsFR.xsl map:parameter name=use-request-parameters value=true/ map:parameter name=tri value={critere}/ /map:transform /map:when ... /map:match /map:when I'm sure the XSLT works well , so I guess the sitemap' syntax ins't good. Can someone help me, please? Thannks in advance, Cyril. - 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: simple question about RequestSelector
Hi Christian, Thanks again very much for your help. I've tested what you suggested me (a good idea...) and it works fine: But, as I read in Cocoon center's lesson about request parameter: Some advantages of RequestSelector over a RequestParamAction are that you can use a default stylesheet when the parameter is not present, and in my example, when I point the browser for the first time to http://localhost:8080/cocoon/hellococoon of course, because I not have participants.xsl among my stylesheets but juste participantsFR.xsl and particpantsEN.xsl, Cocoon generates an error...(In fact, I've added another particpants.xsl styleshhet to fix the problem, but it also requires to build another stylesheet...). Or is there another simplest solution? Regarding the original question, I believe the use-request-parameters configuration needs to go into the configuration section and not into the pipeline. IN the same lesson, it's said apparently that we can: http://www.cocooncenter.de/cc/documents/resources/request-params/transformer .html I've tested it in another example and it seemed to work. In addition, you would not neet the next map:parameter name=tri value={critere}/ becasue *all* parameters are available. Besides, {critere} is undefined at this place since the selector does not set any sitemap variables. For this you would need either the input module syntax above or an action that sets a variable. ...I'm sorry, but I'm afraid not to understand very well what you're trying to explain to me... How can I mix an action and a select? Thanks for your help, Best, Cyril. arrow.gif
Re: simple question about RequestSelector
Thanks to all for your help! It's working now, with two different methods: 1°) Using a RequestParamAction: map:act type=request map:parameter name=parameters value=true/ map:generate src=documents/participants.xml/ map:transform src=stylesheets/participants{langue}.xsl map:parameter name=use-request-parameters value=true/ map:parameter name=tri value={critere}/ /map:transform /map:act and by editing a default participants.xslt file, as described by Joerg. 2°) Using a RequestSelector: map:generate src=documents/participants.xml/ map:select type=request map:parameter name=parameter-name value=langue/ map:when test=francais map:transform type=xslt-with-parameters src=stylesheets/participantsFR.xsl /map:transform /map:when map:when test=anglais map:transform type=xslt-with-parameters src=stylesheets/participantsEN.xsl/ map:parameter name=use-request-parameters value=true/ /map:when map:otherwise map:transform type=xslt-with-parameters src=stylesheets/participantsFR.xsl/ /map:otherwise /map:select map:serialize type=html/ with transformer component 'xslt-with-parameters' defined as below: map:transformer name=xslt-with-parameters src=org.apache.cocoon.transformation.TraxTransformer use-request-parameterstrue/use-request-parameters /map:transformer Now, I will try to do something with i18nTransformer, so that I shouldn't need no more two stylesheets. If you know some accessible documentation about it, I would be very intersted in... Any way , Again Many Thanks, for your Help, Best, Cyril. - Original Message - From: Joerg Heinicke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 25, 2003 4:42 PM Subject: Re: simple question about RequestSelector Hello Cyril, the participants.xsl can be really simple: xsl:stylesheet version=1.0 xmlns:xsl=.. xsl:include href=participantsYOURDEFAULTLANGUAGE.xsl/ /xsl:stylesheet Replacing YOURDEFAULTLANGUAGE with EN or FR you can choose the default language of the application. And the above stylesheet is really not difficult to maintain. But maybe there is such a fallback operation in the input modules too? Regards, Joerg Cyril Vidal wrote: Hi Christian, Thanks again very much for your help. I've tested what you suggested me (a good idea...) and it works fine: But, as I read in Cocoon center's lesson about request parameter: Some advantages of RequestSelector over a RequestParamAction are that you can use a default stylesheet when the parameter is not present, and in my example, when I point the browser for the first time to http://localhost:8080/cocoon/hellococoon of course, because I not have participants.xsl among my stylesheets but juste participantsFR.xsl and particpantsEN.xsl, Cocoon generates an error...(In fact, I've added another particpants.xsl styleshhet to fix the problem, but it also requires to build another stylesheet...). Or is there another simplest solution? Regarding the original question, I believe the use-request-parameters configuration needs to go into the configuration section and not into the pipeline. IN the same lesson, it's said apparently that we can: http://www.cocooncenter.de/cc/documents/resources/request-params/transformer .html I've tested it in another example and it seemed to work. In addition, you would not neet the next map:parameter name=tri value={critere}/ becasue *all* parameters are available. Besides, {critere} is undefined at this place since the selector does not set any sitemap variables. For this you would need either the input module syntax above or an action that sets a variable. ...I'm sorry, but I'm afraid not to understand very well what you're trying to explain to me... How can I mix an action and a select? Thanks for your help, Best, Cyril. - 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]
using RequestSelector + stylesheet parameter
Hi, I would like to use two different stylesheets depending of the value of the parameter 'langue' passed in HTTP Request. In this aim, I use a RequestSelector, and this works well: map:match pattern=* map:generate src=documents/participants.xml/ map:select type=request map:parameter name=parameter-name value=langue/ map:when test=francais map:transform src=stylesheets/participantsFR.xsl /map:transform /map:when map:when test=anglais map:transform src=stylesheets/participantsEN.xsl/ /map:when map:otherwise map:transform src=stylesheets/participantsFR.xsl/ /map:otherwise /map:select map:serialize type=html/ /map:match But I would like also to pass another parameter 'tri ' to the selectionned stylesheet , and I don't know exactly which syntax I should use to combin Selector + stylesheet parameter: I've tried this: map:parameter name=parameter-name value=langue/ map:when test=francais map:transform src=stylesheets/participantsFR.xsl map:parameter name=use-request-parameters value=true/ map:parameter name=tri value={critere}/ /map:transform /map:when but it doesn't work. SOmeone could help me please? Thanks in advance, Cyril. - 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]
error:use Xalan in incremental processing mode
Hi, I'm sorry if this question has already been asked before. I've checked out in the archives, but these seem to be available for the moment... I'm under Windows 2000, j2sdk1.4.1, and Cocoon 2.0.4 I just would like to perform an XSLT transformation. In this aim, I use the very simple sitemap.xmap (snippet): map:match pattern= map:generator src=participants.xml/ map:transform src=participants.xsl/ map:serialize/ /map:match But, infortunately, I receive the following error message: message Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors. description org.apache.cocoon.ProcessingException: Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors 1))I' ve checked the log file and this gives exactly the same informations as above. 2°)I've ran this transformation via command line, (java.org.apache.xalan.xslt.Process -IN participants.xml -XSL particpants.xsl -OUT participants.html) and it was successfull. So, what I have to do to fix he problem, if possible? Thanks in advance for your responses, Cyril. - 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: error:use Xalan in incremental processing mode
Hi Chrisitian Thanks for your answer. My default generator was the 'file' one. ?xml version=1.0? !-- minimal sitemap for Cocoon 2 test -- map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; !-- === Components === -- map:components map:generators default=file/ map:transformers default=xslt/ map:serializers default=html/ map:matchers default=wildcard map:matcher name=wildcard src=org.apache.cocoon.matching.WildcardURIMatcherFactory/ /map:matchers /map:components !-- === Pipelines === -- map:pipelines map:pipeline map:match pattern= map:generator type=file src=participants.xml/ map:transform src=participants.xsl/ map:serialize/ /map:match /map:pipeline /map:pipelines /map:sitemap and the complete error message (no more informations in log) is the following: stack-trace org.apache.cocoon.ProcessingException: Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors. at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat eResource(ProgramGeneratorImpl.java:395) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR esource(ProgramGeneratorImpl.java:353) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr ogramGeneratorImpl.java:312) at org.apache.cocoon.sitemap.Handler.run(Handler.java:267) at java.lang.Thread.run(Thread.java:536)and my stylesheet is as below (nothing special except perhaps use of xsl:key?):?xml version=1.0 encoding=iso-8859-1?xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;xsl:output method=html encoding=iso-8859-1/xsl:param name=tri select='nom'/xsl:key name=clé_pays match=/participants/drapeaux/pays use=nom/xsl:template match=/HTMLBODYH2PARTICIPANTS/H2FORM METHOD=GET ACTION=participants1fieldset class=etiquette style=padding: 10px; font-weight:bold; font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px;legend Trier par : /legendinput type=radio name=critere value=titretitre/inputinput type=radio name=critere value=nomnom/inputinput type=radio name=critere value=prénomprénom/inputinput type=radio name=critere value=organismeorganisme/inputinput type=radio name=critere value=payspays/input/fieldsetp/input TYPE=submit NAME=submit value=Soumettre la requête//FORMtable id=listing class=tableparticipanttheadtrth/ththNom/ththPrénom/thth Organisme/ththAdresse/ththTél/fax/email/ththPays/th/tr/thea dtbodyxsl:apply-templates select=//participantxsl:sort select=*[name()=$tri]//xsl:apply-templates/tbody/table/BODY/HTML /xsl:templatexsl:template match=participanttrtdxsl:value-of select=titre//tdtdxsl:value-of select=nom//tdtdxsl:value-of select=prénom//tdtdxsl:value-of select=organisme//tdtdxsl:apply-templates select=adresse/ligne/span class=paysxsl:value-of select=pays//span/tdtdTél : xsl:value-of select=tél/br/Fax : xsl:value-of select=fax/xsl:apply-templates select=e-mail//tdtdimg style=width: 40px; height:30pxxsl:attribute name=titlexsl:value-of select=pays //xsl:attribute!--xsl:attribute name=srcc:\images/xsl:value-of select=/participants/drapeaux/pays[nom = current()/pays]/nom-image /.gif/xsl:attribute--xsl:attribute name=srcc:/images/xsl:value-of select=key('clé_pays',pays)/nom-image/.gif/xsl:attribute/img/td/tr /xsl:templatexsl:template match=lignexsl:value-of select=./br//xsl:templatexsl:template match=e-mail[text()]br/Email : axsl:attribute name=hrefmailto:xsl:value-of select=.//xsl:attributexsl:value-of select=.//a/xsl:template Cyril.- Original Message - From: Christian Haul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 6:17 PM Subject: Re: error:use Xalan in incremental processing mode On 23.Jan.2003 -- 06:02 PM, Cyril Vidal wrote: Hi, I'm sorry if this question has already been asked before. I've checked out in the archives, but these seem to be available for the moment... I'm under Windows 2000, j2sdk1.4.1, and Cocoon 2.0.4 I just would like to perform an XSLT transformation. In this aim, I use the very simple sitemap.xmap (snippet): map:match pattern= map:generator src=participants.xml/ map:transform src=participants.xsl/ map:serialize/ /map:match But, infortunately, I receive the following error message: message Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors. description org.apache.cocoon.ProcessingException: Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors not enough information. include a larger portion of the logs. perhaps you have the serverpages generator as default? Try map:generate type=file src=participants.xml/ Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint
Re: error:use Xalan in incremental processing mode
For simplicity, I'm using Cocoon's mount directory. I've created inside directory tuto with the sitemap.xmap I've sent to you, particpants.xml and participants.xsl and I call http://localhost:8080/cocoon/mount/tuto/ (so Tomcat/webapps/cocoon/mount/tuto with inside sitemap.xmap, participants.xml and participants.xsl) For me, it should be OK. In the console, I've got the following: Errors in XSLT Transformation: Warning: File jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/Cocoon-2.0.4.jar/org/apache/c ocoon/components/language/markup/sitemap/java/sitemap.xsl; Line1817; Column34; Sitemap pipeline must have at least one of: map:generate, map: aggregate, map:read, map:mount, map:redirect-to, map:call Fatal: Achèvement dirigé de la feuille de style Maybe it can help, Thanks for your help, Cyril. - Original Message - From: Christian Haul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 6:45 PM Subject: Re: error:use Xalan in incremental processing mode On 23.Jan.2003 -- 06:38 PM, Cyril Vidal wrote: Hi Chrisitian Thanks for your answer. My default generator was the 'file' one. that does not make sense (at least to me): map:generator type=file src=participants.xml/ but org.apache.cocoon.ProcessingException: Failed to generate program code (this = org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat You are *sure*? Have you tried to restart your container? Are you sure that it is definately *your* sitemap? 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] - 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: error:use Xalan in incremental processing mode
It's working much better! Thanks Christian for your attention!! Cyril. - Original Message - From: Christian Haul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 8:03 PM Subject: Re: error:use Xalan in incremental processing mode On 23.Jan.2003 -- 07:08 PM, Cyril Vidal wrote: In the console, I've got the following: Errors in XSLT Transformation: Warning: File jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/Cocoon-2.0.4.jar/org/apache/c ocoon/components/language/markup/sitemap/java/sitemap.xsl; Line1817; Column34; Sitemap pipeline must have at least one of: map:generate, map: aggregate, map:read, map:mount, map:redirect-to, map:call Yep. I thought it was wrong copypast. You write map:generator/ but you need to write map:generate/ See, you have omitted crucial information like the message above ;-) 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] - 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 + parameters:it's OK
Hi, Thanks for your response. It runs well now. I've just changed the type of the returned value in public static String get_fac(String number) to public static long get_fac(String number) because it returns a long value. Regards, Cyril. ___ Cyril Vidal Email: [EMAIL PROTECTED] Web: http://www.planetexml.com - Original Message - From: Nils Leßmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 31, 2002 2:16 PM Subject: AW: xsp + parameters Hi, have a look in the generated java file (search for factoriel_xsp.java), that's usually the fastest way to see what's really going on. Anyway, I'd suggest using a second method public static String get_fac(String number) { try { long l = Long.parseLong(number); return fac(l); } catch (NumberFormatException e) { return number+ not a number; } } and calling this from the xsp. Nils -Ursprüngliche Nachricht- Von: cyril vidal [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 31. Dezember 2002 11:08 An: [EMAIL PROTECTED] Betreff: Re: xsp + parameters So, I've tried the following code, in the aim to convert String to long: factorial-calculresult: xsp:exprfac(java:lang.Long.parseLong(xsp-request:get-parameter name=number default=0/))/xsp:expr/factorial-calcul but it doesn't run: Error compiling factoriel_xsp: Line 127, column 57: ')' expected. Line 0, column 0: 1 error - 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]
xsp + parameters
Hi, I would like to calculate the factorial of a number via XSP. The number should be transmitted as a parameter via HTTP. The code I've got for this purpose is the following: it retrieves the parameter 'number' and defines a fac method, that calculates the factorial of its formal parameter. My problem: I don't know the syntax to calculate the fac() for the parameter 'number'. For the moment, I'm just able to calculate fac(8) or fac(13), and it runs well; but itsn't exactly what I want... ?xml version="1.0" encoding="iso-8859-1"? xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xsp:logic public static long fac(long n) { if (n1) return (fac(n-1)*n); else return 1; } /xsp:logic document para xsp-request:get-parameter name="number" default="Not provided"/ /para factorial-calculresult: xsp:exprfac(8)/xsp:expr/factorial-calcul /document /xsp:page I would be very grateful for any assistance, Thanks, Cyril.
Re: pb with http request
OK thanks! It was because of spurious whitespaces before the xml declaration. It runs well now...;-) Cyril. - Original Message - From: Joerg Heinicke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 3:15 AM Subject: Re: pb with http request This has nothing to do with the example, it's a common error message, when having the Xril.ML declaration not as the absolutely first thing in the XML file. There must not be any whitespaces or other characters in front of the XML declaration and it has to be in the form as at http://www.w3.org/TR/REC-xml#sec-prolog-dtd. Watch for case-sensitivity too. Have a look in all the related files to fix the bug. cyril vidal wrote: Hy, I just was trying to run the example wrotten by Steve Punk in Getting started with Cocoon 2 http://www.xml.com/lpt/a/2002/07/10/cocoon2.html More precisely, the last example that calculates a factorial from a numeric value submitted via HTTP POST. Here's the sitemap: map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; snip/ /map:sitemap and here's the file mystylesheet.xsl that I've copied in integrality from the original source: ?xml version=1.0? This one seems to be ok, but I can't see whether there are any whitespaces in the file of course. !-- Author: Steven P. Punte [EMAIL PROTECTED] -- !-- Description: Computes Factorial -- xsl:stylesheet version=1.0 snip/ /xsl:stylesheet When I run this by pointing my browser to http://localhost/mypage?input=5 I receive the following error message: *description* _org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: The XML declaration may only appear at the very beginning of the document._ _I _don't understand why this occurs. Can you help me please? Thanks in advance, Cyril Vidal Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Web: http://www.planetexml.com Regards, Joerg - 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: pb with http request
OK thanks! It was because of spurious whitespaces before the xml declaration. It runs well now...;-) Cyril. - Original Message - From: Joerg Heinicke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 3:15 AM Subject: Re: pb with http request This has nothing to do with the example, it's a common error message, when having the Xril.ML declaration not as the absolutely first thing in the XML file. There must not be any whitespaces or other characters in front of the XML declaration and it has to be in the form as at http://www.w3.org/TR/REC-xml#sec-prolog-dtd. Watch for case-sensitivity too. Have a look in all the related files to fix the bug. cyril vidal wrote: Hy, I just was trying to run the example wrotten by Steve Punk in Getting started with Cocoon 2 http://www.xml.com/lpt/a/2002/07/10/cocoon2.html More precisely, the last example that calculates a factorial from a numeric value submitted via HTTP POST. Here's the sitemap: map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; snip/ /map:sitemap and here's the file mystylesheet.xsl that I've copied in integrality from the original source: ?xml version=1.0? This one seems to be ok, but I can't see whether there are any whitespaces in the file of course. !-- Author: Steven P. Punte [EMAIL PROTECTED] -- !-- Description: Computes Factorial -- xsl:stylesheet version=1.0 snip/ /xsl:stylesheet When I run this by pointing my browser to http://localhost/mypage?input=5 I receive the following error message: *description* _org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: The XML declaration may only appear at the very beginning of the document._ _I _don't understand why this occurs. Can you help me please? Thanks in advance, Cyril Vidal Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Web: http://www.planetexml.com Regards, Joerg - 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]
xsp problem
hy, In the last message, I've asked a question about a small factorial program, dynamically written with a recursive XSLT named-template call and getting a parameter via HTTP request. xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:http="http://xml.apache.org/cocoon/requestgenerator/2.0" xsl:template match="/" page valeur-parametre xsl:value-of select="/http:request/http:requestParameters/ http:parameter/http:value"/ /valeur-parametre calcul-factoriel xsl:call-template name="factorial" xsl:with-param name="input" select="/http:request/ http:requestParameters/http:parameter/http:value"/ /xsl:call-template /calcul-factoriel /page /xsl:template xsl:template name="factorial" xsl:param name="input"/ xsl:choose xsl:when test="$input 1" xsl:variable name="tmp" xsl:call-template name="factorial" xsl:with-param name="input" select="$input - 1" / /xsl:call-template /xsl:variable xsl:value-of select="$tmp * $input"/ /xsl:when xsl:otherwise 1 /xsl:otherwise /xsl:choose /xsl:template /xsl:stylesheet Now, for training, I just would like to do the same with XSP. So, instead of the recursive call to the xsl template name, I'de like to use a Java method: This onemight bethe following: public static int factorialize (int input){ int result; if (inputgt;1) { result=factorialize(input-1); } else{ result=1; } return input*result;} Problem, I'm new to XSP and I don't know exactly how to do. Iknow I have to embeed this code in a xsp:logic element, and get the result with a xsp:expr but I ignore the correct syntax. Can you give me some advice? Thanks, Cyril VidalEmail: [EMAIL PROTECTED]Web: http://www.planetexml.com
pb with http request
Hy, I just was trying to run the example wrotten by Steve Punk in "Getting started with Cocoon 2" http://www.xml.com/lpt/a/2002/07/10/cocoon2.html More precisely, the last example that calculates a factorial from a numeric value submitted via HTTP POST. Here's the sitemap: map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0" map:components map:generatorsmap:generator name="request" logger="sitemap.generator.request" label="data" src="org.apache.cocoon.generation.RequestGenerator"/ /map:generators map:transformers default="xslt"map:transformer name="xslt" logger="sitemap.transformer.xslt" src="org.apache.cocoon.transformation.TraxTransformer"//map:transformers map:serializers map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/ /map:serializers map:matchers default="wildcard" map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"//map:matchers /map:components map:pipelines map:pipeline map:match pattern="mypage" map:generate type="request"/ map:transform src="transforms/mystylesheet.xsl"/ map:serialize type="xml"/ /map:match/map:pipeline /map:pipelines /map:sitemap and here's the file mystylesheet.xsl that I've copied in integrality from the original source: ?xml version="1.0"? !-- Author: Steven P. Punte "[EMAIL PROTECTED]" -- !-- Description: Computes Factorial -- xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:http="http://xml.apache.org/cocoon/requestgenerator/2.0" xsl:template match="/" page incoming-value xsl:value-of select="/http:request/http:requestParameters/ http:parameter/http:value"/ /incoming-value computed-factorial xsl:call-template name="factorial" xsl:with-param name="input" select="/http:request/ http:requestParameters/http:parameter/http:value"/ /xsl:call-template /computed-factorial /page /xsl:template xsl:template name="factorial" xsl:param name="input"/ xsl:choose xsl:when test="$input 1" xsl:variable name="tmp" xsl:call-template name="factorial" xsl:with-param name="input" select="$input - 1" / /xsl:call-template /xsl:variable xsl:value-of select="$tmp * $input"/ /xsl:when xsl:otherwise 1 /xsl:otherwise /xsl:choose /xsl:template /xsl:stylesheet When I run this by pointing my browser to http://localhost/mypage?input=5 I receive the following error message: description org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: The XML declaration may only appear at the very beginning of the document. I don't understand why this occurs. Can you help me please? Thanks in advance, Cyril VidalEmail: [EMAIL PROTECTED]Web: http://www.planetexml.com
Cocoon 2 + Access:it runs now well!!!
- Original Message - From: cyril vidal [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 5:17 PM Subject: Re: Cocoon 2 + Access:it runs now well!!! Hy Christopher! Thanks for your help!!! The was indeed the origin of my problem... Without code errors, Cocoon2 and Access, it runs well!! Thanks again for your help, Regards, Cyril. - Original Message - From: Christopher Watson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 11:05 AM Subject: RE: Cocoon 2 + Access Cyril, If you MUST use access (I do while testing !) ... looking at your example ... xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; you've got an extra after the xmlns:xsp=http://apache.org/xsp; it should be xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; === Don't expect to see much until you do something like the following. I wouldn't know how to use column numbers with esql; I always use names ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; doc esql:connection esql:poolpool/esql:pool esql:execute-query esql:query select userid, sessionid, visitdate, referrer, page from visit /esql:query esql:results esql:row-results row useridesql:get-string column = userid//userid sessionidesql:get-string column = sessionid//sessionid visitdateesql:get-string column = visitdate//visitdate referreresql:get-string column = referrer//referrer pageesql:get-string column = page//page /row /esql:row-results /esql:results /esql:execute-query /esql:connection /doc /xsp:page BUT I agree with others, you're probably safer using MySQL. It's free too! There's even an ODBC driver for it, so you could set an ODNC datasource and look at it through access. -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: 16 May 2002 00:20 To: [EMAIL PROTECTED] Subject: Re: Cocoon 2 + Access Hi Perry, I've tried with // instead of / ,it isn't better... Anyway, I've configurated with esql and pool. the cocoon.xconf looks like this: jdbc name=pool pool-controller min=5 max=10/ dburljdbc:odbc:logs/dburl (with odbc, we don't need to write the complete url, right??) user/user password/password /jdbc and I didn't forget to load the driver in web.xml... My file base1.xsp is this one, as simple as possible, just to test the connection ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; doc esql:connection esql:poolpool/esql:pool /esql:connection /doc /xsp:page To my great surprise, when I execute this file, I obtain: doc xmlns:xsp=http://apache.org/xsp; connection poolpool/pool /connection /doc I think, it's not normal...I should not see the connection element... I think I have to change the line dburljdbc:odbc:logs/dburl but I don't know really how to do... regards, Cyril. - Original Message - From: Faulkner, Perry To: '[EMAIL PROTECTED]' Sent: Thursday, May 16, 2002 12:47 AM Subject: RE: Cocoon 2 + Access Hi Cyril, In theory it should work, as it's just some Java code, similar to that produced by ESQL. The disadvantage, is that you don't have any error checking or logging to fall back on when situations like this occur, and ESQL would provide that. Anyway, the only obvious thing that I can see, is to put \\'s in your connection string, e.g: (jdbc:odbc:localhost:8080/c:\\Mes_documents\\JAVA\\JDBC\\logs); Also turn on ODBC tracing and see if any other information is logged, to help you resolve the problem. Perry -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: Thursday, 16 May 2002 8:18 To: [EMAIL PROTECTED] Subject: Cocoon 2 + Access Hy! I would like to know if it is an obligation to use ESQL and the connection pool provided by Cocoon2 to connect to a database. By example, isn't it possible just to write the following code, by which a simply connection should be executed with the 'logs' database? I've tried it and it doesn't work but I don't know if there's an error on the code or if anyway, it could never run. Some of you can help me, please? Thanks in advance, Cyril. ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:structure xsp:includejava.sql*/xsp:include /xsp:structure Promotion auteur=Jules xsp:logic
Re: Cocoon 2 + Access:it runs now well!!!
Hy Christopher! Thanks for your help!!! The was indeed the origin of my problem... Without code errors, Cocoon2 and Access, it runs well!! Thanks again for your help, Regards, Cyril. - Original Message - From: Christopher Watson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 11:05 AM Subject: RE: Cocoon 2 + Access Cyril, If you MUST use access (I do while testing !) ... looking at your example ... xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; you've got an extra after the xmlns:xsp=http://apache.org/xsp; it should be xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; === Don't expect to see much until you do something like the following. I wouldn't know how to use column numbers with esql; I always use names ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; doc esql:connection esql:poolpool/esql:pool esql:execute-query esql:query select userid, sessionid, visitdate, referrer, page from visit /esql:query esql:results esql:row-results row useridesql:get-string column = userid//userid sessionidesql:get-string column = sessionid//sessionid visitdateesql:get-string column = visitdate//visitdate referreresql:get-string column = referrer//referrer pageesql:get-string column = page//page /row /esql:row-results /esql:results /esql:execute-query /esql:connection /doc /xsp:page BUT I agree with others, you're probably safer using MySQL. It's free too! There's even an ODBC driver for it, so you could set an ODNC datasource and look at it through access. -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: 16 May 2002 00:20 To: [EMAIL PROTECTED] Subject: Re: Cocoon 2 + Access Hi Perry, I've tried with // instead of / ,it isn't better... Anyway, I've configurated with esql and pool. the cocoon.xconf looks like this: jdbc name=pool pool-controller min=5 max=10/ dburljdbc:odbc:logs/dburl (with odbc, we don't need to write the complete url, right??) user/user password/password /jdbc and I didn't forget to load the driver in web.xml... My file base1.xsp is this one, as simple as possible, just to test the connection ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; doc esql:connection esql:poolpool/esql:pool /esql:connection /doc /xsp:page To my great surprise, when I execute this file, I obtain: doc xmlns:xsp=http://apache.org/xsp; connection poolpool/pool /connection /doc I think, it's not normal...I should not see the connection element... I think I have to change the line dburljdbc:odbc:logs/dburl but I don't know really how to do... regards, Cyril. - Original Message - From: Faulkner, Perry To: '[EMAIL PROTECTED]' Sent: Thursday, May 16, 2002 12:47 AM Subject: RE: Cocoon 2 + Access Hi Cyril, In theory it should work, as it's just some Java code, similar to that produced by ESQL. The disadvantage, is that you don't have any error checking or logging to fall back on when situations like this occur, and ESQL would provide that. Anyway, the only obvious thing that I can see, is to put \\'s in your connection string, e.g: (jdbc:odbc:localhost:8080/c:\\Mes_documents\\JAVA\\JDBC\\logs); Also turn on ODBC tracing and see if any other information is logged, to help you resolve the problem. Perry -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: Thursday, 16 May 2002 8:18 To: [EMAIL PROTECTED] Subject: Cocoon 2 + Access Hy! I would like to know if it is an obligation to use ESQL and the connection pool provided by Cocoon2 to connect to a database. By example, isn't it possible just to write the following code, by which a simply connection should be executed with the 'logs' database? I've tried it and it doesn't work but I don't know if there's an error on the code or if anyway, it could never run. Some of you can help me, please? Thanks in advance, Cyril. ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:structure xsp:includejava.sql*/xsp:include /xsp:structure Promotion auteur=Jules xsp:logic Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); Connection conn = DriverManager.getConnection(jdbc:odbc:localhost:8080/c:\Mes_documents\JAVA\ JDBC\logs); Statement stmt = conn.createStatement(); ResultSet resultat = stmt.executeQuery(select * from visit where userid='cyril'); /xsp:logic DescriptionNous proposons une réduction de 25%, restreinte à la période de
Re: Cocoon 2 + Access
Tom, I've tried this and it was runnig well. That's why I'm surprised. I think the problem comes perhaps from my Cocoon configuration, because my access.log file looks like this: DEBUG (2002-05-16) 09:15.48:230 [access] (Unknown-URI) Unknown-thread/CocoonServlet: getRealPath for /: C:\tomcat\webapps\essai\ DEBUG (2002-05-16) 09:15.48:230 [access] (Unknown-URI) Unknown-thread/CocoonServlet: URL for Root: file:/C:/tomcat/webapps/essai/ DEBUG (2002-05-16) 09:15.48:230 [access] (Unknown-URI) Unknown-thread/CocoonServlet: work-directory was not set - defaulting to C:\tomcat\work\localhost\essai\cocoon-files DEBUG (2002-05-16) 09:15.48:390 [access] (Unknown-URI) Unknown-thread/CocoonServlet: upload-directory was not set - defaulting to C:\tomcat\work\localhost\essai\cocoon-files\upload-dir DEBUG (2002-05-16) 09:15.48:390 [access] (Unknown-URI) Unknown-thread/CocoonServlet: cache-directory was not set - defaulting to C:\tomcat\work\localhost\essai\cocoon-files\cache-dir DEBUG (2002-05-16) 09:15.48:390 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Using configuration file: /cocoon.xconf DEBUG (2002-05-16) 09:15.48:500 [access] (Unknown-URI) Unknown-thread/CocoonServlet: show-time was not set - defaulting to false DEBUG (2002-05-16) 09:15.48:500 [access] (Unknown-URI) Unknown-thread/CocoonServlet: parent-component-manager was not set - defaulting to null. DEBUG (2002-05-16) 09:15.48:500 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: org.hsqldb.jdbcDriver DEBUG (2002-05-16) 09:15.48:560 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: sun.jdbc.odbc.JdbcOdbcDriver INFO(2002-05-16) 09:15.48:670 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Reloading from: jndi:/localhost/essai/cocoon.xconf I work in the webapps\essai directory where I have configurated the cocoon.xconf and WEB-INF/web-xml files. After, I also call http://localhost:8080/essai/base.xsp Something wrong must happen herre. Perhaps I have to configure the main cocoon.xconf and web-xml files? Regards, Cyril. - Original Message - From: Tom Klaasen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 16, 2002 9:02 AM Subject: Re: Cocoon 2 + Access Cyril, May I add a suggestion? Perhaps you should first try to make a DB connection from within a simple scratch program (so just in a main() method of some scratch class). I have the impression that the main part of the issues you're having, lies there. Once you have it in scratch code, it will be fairly easy to copypaste it into an XSP page. hth, tomK Faulkner, Perry wrote: Cyril, You probably should set up a datasource, using the ODBC data manager. That's what the logs part 'jdbc:odbc:logs' is referring to in your dburl tag. Use the data source manager to create a data source, 'logs' that refers to your access database 'C:\JAVA\JDBC\logs.mdb'. When you execute, check the cocoon logs, TOMCAT\webapps\cocoon\web-inf\logs to see what problems are occuring, if any! Also enable tracing in the ODBC data source manager to see if your queries are being passed to ODBC. Perry -Original Message- *From:* cyril vidal [mailto:[EMAIL PROTECTED]] *Sent:* Thursday, 16 May 2002 9:20 *To:* [EMAIL PROTECTED] *Subject:* Re: Cocoon 2 + Access Hi Perry, I've tried with // instead of / ,it isn't better... Anyway, I've configurated with esql and pool. the cocoon.xconf looks like this: jdbc name=pool pool-controller min=5 max=10/ dburljdbc:odbc:logs/dburl (with odbc, we don't need to write the complete url, right??) user/user password/password /jdbc and I didn't forget to load the driver in web.xml... My file base1.xsp is this one, as simple as possible, just to test the connection ?xml version=1.0 encoding=iso-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; doc esql:connection esql:poolpool/esql:pool /esql:connection /doc /xsp:page To my great surprise, when I execute this file, I obtain: doc xmlns:xsp=http://apache.org/xsp; connection poolpool/pool /connection /doc I think, it's not normal...I should not see the connection element... I think I have to change the line dburljdbc:odbc:logs/dburl but I don't know really how to do... regards, Cyril. - Original Message - *From:* Faulkner, Perry mailto:[EMAIL PROTECTED] *To:* '[EMAIL PROTECTED]' mailto:[EMAIL PROTECTED]%27 *Sent:* Thursday, May 16, 2002 12:47 AM *Subject:* RE: Cocoon 2 + Access Hi Cyril, In theory it should work
Cocoon 2 + Access
Hy! I would like to knowif it is an obligation to use ESQL and the connection pool provided by Cocoon2 to connect to a database. By example, isn't it possible just to write the following code, by which a simply connection should be executed with the 'logs' database? I've tried it and it doesn't work but I don't know if there's an error on the code or if anyway, it could never run. Some of you can help me, please? Thanks in advance, Cyril. ?xml version="1.0" encoding="iso-8859-1"?xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xsp:structurexsp:includejava.sql*/xsp:include/xsp:structure Promotion auteur="Jules" xsp:logicClass.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection conn = DriverManager.getConnection("jdbc:odbc:localhost:8080/c:\Mes_documents\JAVA\JDBC\logs");Statement stmt = conn.createStatement();ResultSet resultat = stmt.executeQuery("select * from visit where userid='cyril'");/xsp:logic DescriptionNous proposons une réduction de 25%, restreinte à la période de Septembre 20001 à OCtobre 20001/Description rowuseridxsp:exprresultat.getString (1)/xsp:expr/useridsessionidxsp:exprresultat.getString (2)/xsp:expr/sessionidvisitdatexsp:exprresultat.getString (3)/xsp:expr/visitdatereferrerxsp:exprresultat.getString (4)/xsp:expr/referrerpagexsp:exprresultat.getString (5)/xsp:expr/page/row /Promotion/xsp:page
Re: Cocoon 2 + Access
Hi Perry, I've tried with // instead of / ,it isn't better... Anyway, I've configurated with esql and pool. the cocoon.xconf looks like this: jdbc name="pool" pool-controller min="5" max="10"/ dburljdbc:odbc:logs/dburl (with odbc, we don't need to write the complete url, right??) user/user password/password /jdbc and I didn't forget to load the driver in web.xml... My file base1.xsp is this one, as simple as possible, just to test the connection ?xml version="1.0" encoding="iso-8859-1"?xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" doc esql:connection esql:poolpool/esql:pool /esql:connection/doc /xsp:page To my great surprise, when I execute this file, I obtain: doc xmlns:xsp="http://apache.org/xsp" connection poolpool/pool /connection /doc I think, it's not normal...I shouldnot see the connection element... I think I have to change the line dburljdbc:odbc:logs/dburl but I don't know really how to do... regards, Cyril. - Original Message - From: Faulkner, Perry To: '[EMAIL PROTECTED]' Sent: Thursday, May 16, 2002 12:47 AM Subject: RE: Cocoon 2 + Access Hi Cyril, In theory it should work, as it's just some Java code, similar to that produced by ESQL. The disadvantage, is that you don't have any error checking or logging to fall back on when situations like this occur, and ESQL would provide that. Anyway, the only obvious thing that I can see, is to put\\'s in your connection string, e.g: ("jdbc:odbc:localhost:8080/c:\\Mes_documents\\JAVA\\JDBC\\logs"); Also turn on ODBC tracing and see if any other information is logged, to help you resolve the problem. Perry -Original Message-From: cyril vidal [mailto:[EMAIL PROTECTED]]Sent: Thursday, 16 May 2002 8:18To: [EMAIL PROTECTED]Subject: Cocoon 2 + Access Hy! I would like to knowif it is an obligation to use ESQL and the connection pool provided by Cocoon2 to connect to a database. By example, isn't it possible just to write the following code, by which a simply connection should be executed with the 'logs' database? I've tried it and it doesn't work but I don't know if there's an error on the code or if anyway, it could never run. Some of you can help me, please? Thanks in advance, Cyril. ?xml version="1.0" encoding="iso-8859-1"?xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xsp:structurexsp:includejava.sql*/xsp:include/xsp:structure Promotion auteur="Jules" xsp:logicClass.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection conn = DriverManager.getConnection("jdbc:odbc:localhost:8080/c:\Mes_documents\JAVA\JDBC\logs");Statement stmt = conn.createStatement();ResultSet resultat = stmt.executeQuery("select * from visit where userid='cyril'");/xsp:logic DescriptionNous proposons une réduction de 25%, restreinte à la période de Septembre 20001 à OCtobre 20001/Description rowuseridxsp:exprresultat.getString (1)/xsp:expr/useridsessionidxsp:exprresultat.getString (2)/xsp:expr/sessionidvisitdatexsp:exprresultat.getString (3)/xsp:expr/visitdatereferrerxsp:exprresultat.getString (4)/xsp:expr/referrerpagexsp:exprresultat.getString (5)/xsp:expr/page/row /Promotion/xsp:page
Re: Problems with XSP
I've checked the Tomcat work directory, and there's just compteur_xsp.java. So compteur.xsp must not be correct. The code is the following: ?xml version="1.0"?xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"xsp:logicstatic private int counter = 0; private synchronized int count(){return counter++;}/xsp:logic pagep J'ai été visitée xsp:exprcount()/xsp:expr fois. /p/page/xsp:page Someone could tell me where's the error, please? Best, Cyril. - Original Message - From: Graaf, Edgar de (fin) To: '[EMAIL PROTECTED]' Sent: Wednesday, April 24, 2002 11:22 AM Subject: RE: Problems with XSP Your XSP was not compiled because it contains some error. Then you don't have a class and get a ClassNotFoundException. Search in the Tomcat work directory for compteur. Do you only find compteur_xsp.java? Or also compteur_xsp.class? Regards Edgar -Oorspronkelijk bericht-Van: cyril vidal [mailto:[EMAIL PROTECTED]]Verzonden: dinsdag 23 april 2002 21:55Aan: [EMAIL PROTECTED]Onderwerp: Problems with XSP HY! Iwould liketo execute a very simple XSP sample. Here is my sitemap: map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0" map:components map:generators default="file" map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/ map:generator name="serverpages" src="org.apache.cocoon.generation.ServerPagesGenerator"//map:generators map:transformers default="xslt" map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"//map:transformers map:readers default="resource" map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"//map:readers map:serializers default="html" map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/ map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/ map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/ map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"//map:serializers map:matchers default="wildcard" map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"//map:matchers /map:components map:pipelines map:pipeline map:match pattern="index.html" map:read src="static/index.html" mime-type="text/html"/ /map:match /map:pipeline map:pipeline map:match pattern="CinemaFO.pdf" map:generate src="static/CinemaFO.xml"/ map:transform src="transforms/CinemaFO.xsl"/ map:serialize type="fo2pdf"/ /map:match /map:pipeline map:pipeline map:match pattern="compteur.xsp" map:generate type="serverpages" src="transforms/compteur.xsp"/ map:transform src="transforms/page-html.xsl"/ map:serialize/ /map:match /map:pipeline /map:pipelines /map:sitemap Unfortunately, when I execute the file compteur.xsp, I get the following error message: type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Could not load class for program 'org\apache\cocoon\www\transforms\compteur_xsp' due to a java.lang.ClassNotFoundException: org.apache.cocoon.www.transforms.compteur_xsp sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri/essai/compteur.xsp path-infocompteur.xspSomeone could help me, please?Thanks,Cyril.
Re: Problems with XSP
Thanks Vadim! It's now OK... - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 11:14 PM Subject: RE: Problems with XSP From: cyril vidal [mailto:[EMAIL PROTECTED]] I've put away the language attribute on the namespace. So I have: ?xml version=1.0 encoding=iso-8859-1? xsp:page xmlns:xsp=http://www.apache.org/1999/XSP/Core; You still have wrong namespace. From hello.xsp: xsp:page language=java xmlns:xsp=http://apache.org/xsp; page ... /page /xsp:page Vadim xsp:logic static private int counter = 0; private synchronized int count(){ return counter++; } /xsp:logic page p J'ai été visitée xsp:exprcount()/xsp:expr fois. /p /page /xsp:page but it still doesn't work... - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 25, 2002 9:52 PM Subject: RE: Problems with XSP 1. Check XSP namespace. It is not correct. 2. Is this valid UTF-8? Or ISO-8859-1? Specify encoding in ?xml? instruction. Vadim -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 2:41 PM To: [EMAIL PROTECTED] Subject: Re: Problems with XSP I've checked the Tomcat work directory, and there's just compteur_xsp.java. So compteur.xsp must not be correct. The code is the following: ?xml version=1.0? xsp:page language=java xmlns:xsp=http://www.apache.org/1999/XSP/Core; xsp:logic static private int counter = 0; private synchronized int count(){ return counter++; } /xsp:logic page p J'ai été visitée xsp:exprcount()/xsp:expr fois. /p /page /xsp:page Someone could tell me where's the error, please? Best, Cyril. - Original Message - From: Graaf, Edgar de (fin) To: '[EMAIL PROTECTED]' Sent: Wednesday, April 24, 2002 11:22 AM Subject: RE: Problems with XSP Your XSP was not compiled because it contains some error. Then you don't have a class and get a ClassNotFoundException. Search in the Tomcat work directory for compteur. Do you only find compteur_xsp.java? Or also compteur_xsp.class? Regards Edgar -Oorspronkelijk bericht- Van: cyril vidal [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 23 april 2002 21:55 Aan: [EMAIL PROTECTED] Onderwerp: Problems with XSP HY! I would like to execute a very simple XSP sample. Here is my sitemap: map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:components map:generators default=file map:generator name=file src=org.apache.cocoon.generation.FileGenerator/ map:generator name=serverpages src=org.apache.cocoon.generation.ServerPagesGenerator/ /map:generators map:transformers default=xslt map:transformer name=xslt src=org.apache.cocoon.transformation.TraxTransformer/ /map:transformers map:readers default=resource map:reader name=resource src=org.apache.cocoon.reading.ResourceReader/ /map:readers map:serializers default=html map:serializer name=xml mime-type=text/xml src=org.apache.cocoon.serialization.XMLSerializer/ map:serializer name=html mime-type=text/html src=org.apache.cocoon.serialization.HTMLSerializer/ map:serializer name=svg2png src=org.apache.cocoon.serialization.SVGSerializer mime-type=image/png/ map:serializer name=fo2pdf src=org.apache.cocoon.serialization.FOPSerializer mime-type=application/pdf/ /map:serializers map:matchers default=wildcard map:matcher name=wildcard src=org.apache.cocoon.matching.WildcardURIMatcher/ /map:matchers /map:components map:pipelines map:pipeline map:match pattern=index.html map:read src=static/index.html mime-type=text/html/ /map:match /map:pipeline map:pipeline map:match pattern=CinemaFO.pdf map:generate src=static/CinemaFO.xml/ map:transform src=transforms/CinemaFO.xsl/ map:serialize type=fo2pdf/ /map:match /map:pipeline map:pipeline map:match pattern=compteur.xsp map:generate type=serverpages src=transforms/compteur.xsp/ map:transform src=transforms/page-html.xsl/ map:serialize/ /map:match /map:pipeline /map:pipelines /map:sitemap Unfortunately, when I execute the file compteur.xsp, I get the following error message: type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Could not load class for program 'org\apache\cocoon\www\transforms\compteur_xsp' due to a java.lang.ClassNotFoundException: org.apache.cocoon.www.transforms.compteur_xsp sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri /essai/compteur.xsp path-info compteur.xsp Someone could help me, please? Thanks, Cyril. - 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
Problems with XSP
HY! Iwould liketo execute a very simple XSP sample. Here is my sitemap: map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0" map:components map:generators default="file" map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/ map:generator name="serverpages" src="org.apache.cocoon.generation.ServerPagesGenerator"//map:generators map:transformers default="xslt" map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"//map:transformers map:readers default="resource" map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"//map:readers map:serializers default="html" map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/ map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/ map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/ map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"//map:serializers map:matchers default="wildcard" map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"//map:matchers /map:components map:pipelines map:pipeline map:match pattern="index.html" map:read src="static/index.html" mime-type="text/html"/ /map:match /map:pipeline map:pipeline map:match pattern="CinemaFO.pdf" map:generate src="static/CinemaFO.xml"/ map:transform src="transforms/CinemaFO.xsl"/ map:serialize type="fo2pdf"/ /map:match /map:pipeline map:pipeline map:match pattern="compteur.xsp" map:generate type="serverpages" src="transforms/compteur.xsp"/ map:transform src="transforms/page-html.xsl"/ map:serialize/ /map:match /map:pipeline /map:pipelines /map:sitemap Unfortunately, when I execute the file compteur.xsp, I get the following error message: type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Could not load class for program 'org\apache\cocoon\www\transforms\compteur_xsp' due to a java.lang.ClassNotFoundException: org.apache.cocoon.www.transforms.compteur_xsp sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri/essai/compteur.xsp path-infocompteur.xspSomeone could help me, please?Thanks,Cyril.
fo2pdf serializer
Good evening, I've got problems with transforming an xml document (CinemaFO.xml) into a pdf one (CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl). I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them by command line with fop 0.20.3 To test my samples with Cocoon2, I've created a new clean environment, also a new directory under $CATALINA_HOME/webapps/ , e.g. essai. Underessai, I've createdthe followingrepertory structure: /static (including the file CinemaFO.xml and index.html) and transforms(including the file CinemaFO.xsl), and I've also copied over both $COCOON_HOME/cocoon.xconf and the $COCOON_HOME/WEB-INF directory. The structure of my sitemap.xmap file (in directory essai) is following: map:pipelines map:pipeline map:match pattern="index.html" map:read src="static/index.html" mime-type="text/html"/ /map:match /map:pipeline map:pipeline map:match pattern="CinemaFO.xml" map:generate src="static/CinemaFO.xml"/ map:transform src="transforms/CinemaFO.xsl"/ map:serialize type="fo2pdf"/ /map:match /map:pipeline Theres is no problem with serving static document index.html. But when I try to perform the xslfo transformation by requesting the URL:http://localhost:8080/essai/CinemaFO.xml,I've got any message error (It means the server finds the files) but the browser (IE6)stays completely white. With Netscape 6, the browser opens Acrobat reader, but there's a message error, that indicates that an error occured at the opening of the pdf document. What do you think is wrong? Thanks a lot for your answers, Cyril.
Re: fo2pdf serializer
Sorry, but what is SSL? I think the answer is no... - Original Message - From: Nicola Ken Barozzi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 8:25 PM Subject: Re: fo2pdf serializer I've had your same problem using SSL on Tomcat, and it goes away with the normal connector. The really strange thing, though, is that the test svg from the Cocoon webapp *works* under SSL! Are you using SSL? -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - Original Message - From: cyril vidal To: [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 8:16 PM Subject: fo2pdf serializer Good evening, I've got problems with transforming an xml document (CinemaFO.xml) into a pdf one (CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl). I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them by command line with fop 0.20.3 To test my samples with Cocoon2, I've created a new clean environment, also a new directory under $CATALINA_HOME/webapps/ , e.g. essai. Under essai, I've created the following repertory structure: /static (including the file CinemaFO.xml and index.html) and transforms(including the file CinemaFO.xsl), and I've also copied over both $COCOON_HOME/cocoon.xconf and the $COCOON_HOME/WEB-INF directory. The structure of my sitemap.xmap file (in directory essai) is following: map:pipelines map:pipeline map:match pattern=index.html map:read src=static/index.html mime-type=text/html/ /map:match /map:pipeline map:pipeline map:match pattern=CinemaFO.xml map:generate src=static/CinemaFO.xml/ map:transform src=transforms/CinemaFO.xsl/ map:serialize type=fo2pdf/ /map:match /map:pipeline Theres is no problem with serving static document index.html. But when I try to perform the xslfo transformation by requesting the URL:http://localhost:8080/essai/CinemaFO.xml, I've got any message error (It means the server finds the files) but the browser (IE6) stays completely white. With Netscape 6, the browser opens Acrobat reader, but there's a message error, that indicates that an error occured at the opening of the pdf document. What do you think is wrong? Thanks a lot for your answers, Cyril. - 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: fo2pdf serializer
HI! Thanks a lot for all your tips! That's the result of my experiments: first, I've done what Stijn told to me: so remplace fop 0.20.3rc.jar by fop.jar of FOP 0.20.3 It's running by calling the URL http:/localhost:8080/essai/CinemaFO.xml only with Netscape6 (with IE6, I still have a white page!) So, after, I followed Andrew's tip: I changed my pattern to map:match pattern=CinemaFO.pdf and by calling the URL http:/localhost:8080/essai/CinemaFO.pdf it now is running with both browsers! Thanks a lot for having helped me, Cyril. - Original Message - From: Stijn Van Vreckem [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 9:56 PM Subject: Re: fo2pdf serializer I had a similar problem, my stylesheet was running from command line and produced the pdf. Within cocoon it gave some errors and produced no output. I changed the fop jar from cocoon (version 0.20.3rc with the latest version 0.20.3 ) and everything was running again ! On Tue, 2 Apr 2002, cyril vidal wrote: Good evening, I've got problems with transforming an xml document (CinemaFO.xml) into a pdf one (CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl). I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them by command line with fop 0.20.3 To test my samples with Cocoon2, I've created a new clean environment, also a new directory under $CATALINA_HOME/webapps/ , e.g. essai. Under essai, I've created the following repertory structure: /static (including the file CinemaFO.xml and index.html) and transforms(including the file CinemaFO.xsl), and I've also copied over both $COCOON_HOME/cocoon.xconf and the $COCOON_HOME/WEB-INF directory. The structure of my sitemap.xmap file (in directory essai) is following: map:pipelines map:pipeline map:match pattern=index.html map:read src=static/index.html mime-type=text/html/ /map:match /map:pipeline map:pipeline map:match pattern=CinemaFO.xml map:generate src=static/CinemaFO.xml/ map:transform src=transforms/CinemaFO.xsl/ map:serialize type=fo2pdf/ /map:match /map:pipeline Theres is no problem with serving static document index.html. But when I try to perform the xslfo transformation by requesting the URL:http://localhost:8080/essai/CinemaFO.xml, I've got any message error (It means the server finds the files) but the browser (IE6) stays completely white. With Netscape 6, the browser opens Acrobat reader, but there's a message error, that indicates that an error occured at the opening of the pdf document. What do you think is wrong? Thanks a lot for your answers, Cyril. -- Stijn Van Vreckem - 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]
sitemap_xmap.java cut!
Hi, Some of you would know why my file sitemap_xmap.java is cut up (after generator method instruction) and so why I can't absolutly not transform my xml document as I would like to? I've installed binary version of Cocoon2.0.1 with Tomcat 4.0.1 on Windows Me Thanks for your answers. Cyril.
Re: sitemap_xmap.java cut!
Roman, Sorry for still disturbing you. But I don't understand what I have to write instead of: map:tranform src=transforms/tri.xsl/ Is this instruction not correct? Best, Cyril. - Original Message - From: KOZLOV Roman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 19, 2002 1:42 PM Subject: Re: sitemap_xmap.java cut! Cyril, I've found the reason - error in your sitemap: map:tranform src=transforms/tri.xsl/ - tranform instead of transform. Best regards Roman cyril vidal wrote: Hi, Some of you would know why my file sitemap_xmap.java is cut up (after generator method instruction) and so why I can't absolutly not transform my xml document as I would like to?I've installed binary version of Cocoon2.0.1 with Tomcat 4.0.1 on Windows Me Thanks for your answers.Cyril. - 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: sitemap_xmap.java cut!
Roman, Emmanuel, I'm sorry Thanks a lot for your help. I hope it will run now Cyril. - Original Message - From: KOZLOV Roman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 19, 2002 3:17 PM Subject: Re: sitemap_xmap.java cut! You missed s in transform word. You have to write: map:transform src=transforms/tri.xsl/ instead of map:tranform src=transforms/tri.xsl/ Roman cyril vidal wrote: Roman, Sorry for still disturbing you. But I don't understand what I have to write instead of: map:tranform src=transforms/tri.xsl/ Is this instruction not correct? Best, Cyril. - Original Message - From: KOZLOV Roman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 19, 2002 1:42 PM Subject: Re: sitemap_xmap.java cut! Cyril, I've found the reason - error in your sitemap: map:tranform src=transforms/tri.xsl/ - tranform instead of transform. Best regards Roman cyril vidal wrote: Hi, Some of you would know why my file sitemap_xmap.java is cut up (after generator method instruction) and so why I can't absolutly not transform my xml document as I would like to?I've installed binary version of Cocoon2.0.1 with Tomcat 4.0.1 on Windows Me Thanks for your answers.Cyril. - 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] - 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]
XML Declaration
Ihope one day I willsucceed in transforming XML-PDF with Cocoon... After the "tranform" corrected, I now obtain the following message: message Exception in creating Transform Handler description org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: The XML declaration may only appear at the very beginning of the document This is my xml document: ?xml version="1.0"?sonnet type="Shakespearean" author last-nameShakespeare/last-name first-nameWilliam/first-name nationalityBritish/nationality year-of-birth1564/year-of-birth year-of-death1616/year-of-death /author titleSonnet 130/title lines lineMy mistress' eyes are nothing like the sun,/line lineCoral is far more red than her lips red./line lineIf snow be white, why then her breasts are dun,/line lineIf hairs be wires, black wires grow on her head./line lineI have seen roses damasked, red and white,/line lineBut no such roses see I in her cheeks./line lineAnd in some perfumes is there more delight/line lineThan in the breath that from my mistress reeks./line lineI love to hear her speak, yet well I know/line lineThat music hath a far more pleasing sound./line lineI grant I never saw a goddess go,/line lineMy mistress when she walks, treads on the ground./line lineAnd yet, by Heaven, I think my love as rare/line lineAs any she belied with false compare./line /lines/sonnet and thesummary of the XLS-fo one: ?xml version="1.0"?xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"xsl:template match="/" xsl:apply-templates select="sonnet"/ /xsl:template xsl:template match="sonnet" xsl:processing-instruction name="cocoon-format"type="text/xslfo"/xsl:processing-instruction /xsl:stylesheet What do you think is wrong? Thanks for your answers, Cyril. Thanks for your answer, Cyril.
error-compling sitemap_xmap
Hello, When I want to transform some documents (it doesn't happen with serving static documents), Iobtain a strange error message type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 571, column 63: '}' expected. Line 0, column 0: Note: C:\tomcat\work\localhost\essai\cocoon-files\org\apache\cocoon\www\sitemap_xmap.java uses or overrides a deprecated API. Recompile with "-deprecation" for details. 1 error, 1 warning but my sitemap.xmap file doesn't include 571 lignes!!! This is the short following one: ?xml version="1.0"?map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0" map:componentsmap:generators default="file" map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"//map:generators map:transformers default="xslt" map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"//map:transformers map:readers default="resource" map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"//map:readers map:serializers default="html" map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/ map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/ map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/ map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"//map:serializers map:matchers default="wildcard" map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"//map:matchers/map:components map:pipelines map:pipeline map:match pattern="index.html" map:read src="static/index.html" mime-type="text/html"/ /map:match /map:pipelinemap:pipeline map:match pattern="content/*.html" map:generate src="content/{1}.xml"/ map:tranform src="transforms/tri.xsl"/ map:serialize type="html"/ /map:match/map:pipeline /map:pipelines /map:sitemap Someone could tell me what's happening? Thanks for your help, Cyril.
Re: error-compling sitemap_xmap
Thomas, John, thanks a lot for your help. I've looked for the mentionned file. But actually, it's a little bit too difficult for me to find the line 573 in the java file, especiallyfor a missing "}". I've tried it but without success... I've forgotten to say to you that when I start Tomcat, I get the following message in the command line: Server. run /init:java.net.BindExecption:Adress in use:bind java.net.BindException:Adress in use:bind at java.net.PlainSocketImpl.socketBind(nativMethod) ... Sitemap location = sitemap.xmap Checking sitemap reload=true ... Starting service Tomcat-Apache Apache Tomcat/4.0.1 Is this normal? Doesn't the above compilation error come from here? Is this compilation error a frequent error? Thanks for your answers, Cyril. - Original Message - From: John Turk To: [EMAIL PROTECTED] Sent: Monday, March 18, 2002 8:14 PM Subject: RE: error-compling sitemap_xmap Cyril - sitemap.xmap is converted into a java source file - that's the file the 571 lines refers to. You can find that fileunder the Tomcat work directory (look for something like cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java). John -Original Message-From: cyril vidal [mailto:[EMAIL PROTECTED]]Sent: Monday, March 18, 2002 11:05 AMTo: [EMAIL PROTECTED]Subject: error-compling sitemap_xmap Hello, When I want to transform some documents (it doesn't happen with serving static documents), Iobtain a strange error message type fatal message Language Exception description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling sitemap_xmap: Line 571, column 63: '}' expected. Line 0, column 0: Note: C:\tomcat\work\localhost\essai\cocoon-files\org\apache\cocoon\www\sitemap_xmap.java uses or overrides a deprecated API. Recompile with "-deprecation" for details. 1 error, 1 warning but my sitemap.xmap file doesn't include 571 lignes!!! This is the short following one: ?xml version="1.0"?map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0" map:componentsmap:generators default="file" map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"//map:generators map:transformers default="xslt" map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"//map:transformers map:readers default="resource" map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"//map:readers map:serializers default="html" map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/ map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/ map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/ map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"//map:serializers map:matchers default="wildcard" map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"//map:matchers/map:components map:pipelines map:pipeline map:match pattern="index.html" map:read src="static/index.html" mime-type="text/html"/ /map:match /map:pipelinemap:pipeline map:match pattern="content/*.html" map:generate src="content/{1}.xml"/ map:tranform src="transforms/tri.xsl"/ map:serialize type="html"/ /map:match/map:pipeline /map:pipelines /map:sitemap Someone could tell me what's happening? Thanks for your help, Cyril.
Re: Transformation XML-PDF
Hello, finally, I've put my two files sonnet.xml and sonnet.fo.xsl in the tomcat\webapps\root directory and when I've called the adress http://localhost:8080/sonnet.xml Tomcat was able to find it. But without any xsl or fop transformation... Does it mean I have to do the configuration Vadim is talking about in his tutorial, that is: 2. Copy following libraries from the xml-cocoon2\lib\core directory to the %CATALINA_HOME%\common\lib directory: xalan-2.3.1.jar xercesImpl-2.0.0.jar xml-apis.jar 3. Copy following library from the xml-cocoon2\lib\optional directory to the %CATALINA_HOME%\common\lib directory: batik-libs-1.1.1.jar 4. Remove xt-19991105.jar from the xml-cocoon2\lib\optional directory. 5. Edit extra-classpath parameter in the xml-cocoon2\src\webapp\WEB-INF\web.xml: init-param param-nameextra-classpath/param-name param-valueC:\Apache\jakarta-tomcat-4.0.3\common\lib\xalan-2.3.1.jar;C :\Apache\jakarta-tomcat-4.0.3\common\lib\xercesImpl-2.0.0.jar;C:\Apache\ jakarta-tomcat-4.0.3\common\lib\xml-apis.jar;C:\Apache\jakarta-tomcat-4. 0.3\common\lib\batik-libs-1.1.1.jar/param-value /init-param Will it run after this? Thanks for your answers, Cyril. - Original Message - From: cyril vidal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 16, 2002 7:12 PM Subject: Transformation XML-PDF Hello, I would like to transform an XML Document with Cocoon in a PDF one. I think my two files sonnet.xml and sonnet.fo.xsl are correct (I've got them from a tutorial) I've created the directory PDFDemo in tomcat/webapps and put my two files in this directory (PDFDemo). But when I want to look to the transformation with http://localhost:8080/PDFDemo/sonnet.xml, I've got the following message error: type Status report message /PDFDemo/sonnet.xml description The requested resource (/PDFDemo/sonnet.xml) is not available. What's still wrong? Thanks for your answers Cyril. - 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]
Transformation XML-PDF
Hello, I would like to transform an XML Document with Cocoon in a PDF one. I think my two files sonnet.xml and sonnet.fo.xsl are correct (I've got them from a tutorial) I've created the directory PDFDemo in tomcat/webapps and put my two files in this directory (PDFDemo). But when I want to look to the transformation with http://localhost:8080/PDFDemo/sonnet.xml, I've got the following message error: type Status report message /PDFDemo/sonnet.xml description The requested resource (/PDFDemo/sonnet.xml) is not available. What's still wrong? Thanks for your answers Cyril. - 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: Installation Cocoon 2.0.1
Hi vadim, I've also followed your instructions for the binary version. 1°) Instead of XercesImpl-2.0.0.jar, I've got xerces-1.4.4.jar. It doesn't matter? 2°) I apologize for my absolute ignorance, but I don't know how to execute these two instructions: 6. Clean Cocoon: build clean 7. Build Cocoon: build -Dinclude.webapp.libs=yes webapp May you still once help me? Thanks a lot, Cyril - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 8:57 PM Subject: RE: Installation Cocoon 2.0.1 From: cyril vidal [mailto:[EMAIL PROTECTED]] Vadim, Actually, i've downloaded the Cocoon 2.0.1 binary version. Can't it really don't work by this way? Steps were written for src version. You can try with binary version also. First unpack cocoon.war in tomcat/webapps/cocoon, remove cocoon.war; then follow instructions, only instead of lib/core directory you will have tomcat/cocoon/WEB-INF/lib directory. PS remove also tomcat/work/* directories. Vadim Cyril. - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 7:56 PM Subject: RE: Installation Cocoon 2.0.1 From: cyril vidal [mailto:[EMAIL PROTECTED]] Vadim, thanks for the tip. I've read your tutorial. Bu I don't find the cocoon directory you're talking about in step 2 : xml-cocoon2\lib\core -:(. Could you please tell me how to see it? I apologize for these really basics questions... xml-cocoon2 referes to place were *source Cocoon distribution* is installed. If you don't have lib/core, you must have at least lib/. If you have binary distribution, try source one. Snapshot is available from http://cvs.apache.org/snapshots/xml-cocoon2/, or download release: http://xml.apache.org/cocoon/dist/cocoon-2.0.1-src.zip Vadim Cyril. - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 6:32 PM Subject: RE: Installation Cocoon 2.0.1 Read http://marc.theaimsgroup.com/?t=10150987843r=1w=2 Vadim -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: Installation Cocoon 2.0.1 Hello! I'm trying to install Cocoon 2.0.1 with the servlet engine Tomcat 4.0.3 on Windows Millenium, but it doesn't work. This is what I've done: a) I've downloaded Cocoon on c:\cocoon (Tomcat is on c:/tomcat) b) I've copied the file c:\cocoon\cocoon.war on c:\tomcat\webapps c) I've run Tomcat d) I've written http://localhost:8080/cocoon/ on IE6 but unfortunelately, I've always the same http 500 Internal Server Error: exception javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:935) at org.apache.catalina.core.StandardWrapper.allocate(Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) and below this one root cause java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Compiled Code) at java.security.SecureClassLoader.defineClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.configur e(Compiled Code) I don't know what to do. What's wrong? Thanks a lot for your answers, Cyril. - 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] - Please
No more problem with Cocoon
Vadim, With Tomcat 4.0.1, all is OK!!! Thanks a lot for having helped me. Next time, I will use the right version... Cyril - Original Message - From: cyril vidal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 15, 2002 8:27 PM Subject: Re: Installation Cocoon 2.0.1 It still doesn't work. By the way, I don't understand why by just copying the cocoon.war file into tomcat/webapps directory, it doesn't work. If read the installation instructions, for the binary version, it should, no? Something must be wrong but I really don't undertsand why (my servlet engine runs well and the problem doesn't come from it) It's the last time I disturb the list with this problem, but I would like so much It would run... Perhaps, with the content of my autoexec.bat, It would help: SET COMSPEC=C:\WINDOWS\COMMAND.COM SET windir=C:\WINDOWS SET winbootdir=C:\WINDOWS SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\jdk1.2\bin; SET CLASSPATH=C:\tomcat\common\lib\servlet.jar SET JAVA_HOME=c:\jdk1.2 SET CATALINA_HOME=c:\tomcat SET PROMPT=$p$g SET TEMP=C:\WINDOWS\TEMP SET TMP=C:\WINDOWS\TEMP Thanks Cyril. - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 15, 2002 7:43 PM Subject: RE: Installation Cocoon 2.0.1 From: cyril vidal [mailto:[EMAIL PROTECTED]] Hi vadim, I've also followed your instructions for the binary version. 1°) Instead of XercesImpl-2.0.0.jar, I've got xerces-1.4.4.jar. It doesn't matter? No. 2°) I apologize for my absolute ignorance, but I don't know how to execute these two instructions: 6. Clean Cocoon: build clean 7. Build Cocoon: build -Dinclude.webapp.libs=yes webapp That's for source distribution. Vadim May you still once help me? Thanks a lot, Cyril - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 8:57 PM Subject: RE: Installation Cocoon 2.0.1 From: cyril vidal [mailto:[EMAIL PROTECTED]] Vadim, Actually, i've downloaded the Cocoon 2.0.1 binary version. Can't it really don't work by this way? Steps were written for src version. You can try with binary version also. First unpack cocoon.war in tomcat/webapps/cocoon, remove cocoon.war; then follow instructions, only instead of lib/core directory you will have tomcat/cocoon/WEB-INF/lib directory. PS remove also tomcat/work/* directories. Vadim snip/ - 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] - 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]
Installation Cocoon 2.0.1
Hello! I'm trying to install Cocoon 2.0.1 with the servlet engine Tomcat 4.0.3 on Windows Millenium, but it doesn't work. This is what I've done: a) I've downloaded Cocoon on c:\cocoon (Tomcat is on c:/tomcat) b) I've copied the file c:\cocoon\cocoon.war on c:\tomcat\webapps c) I've run Tomcat d) I've written http://localhost:8080/cocoon/ on IE6 but unfortunelately, I've always the same http 500 Internal Server Error: exception javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935) at org.apache.catalina.core.StandardWrapper.allocate(Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) and below this oneroot cause java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Compiled Code) at java.security.SecureClassLoader.defineClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.configure(Compiled Code)I don't know what to do. What's wrong?Thanks a lot for your answers,Cyril.
Re: Installation Cocoon 2.0.1
Vadim, thanks for the tip. I've read your tutorial. Bu I don't find the cocoon directory you're talking about in step 2 : xml-cocoon2\lib\core -:(. Could you please tell me how to see it? I apologize for these really basics questions... Cyril. - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 6:32 PM Subject: RE: Installation Cocoon 2.0.1 Read http://marc.theaimsgroup.com/?t=10150987843r=1w=2 Vadim -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: Installation Cocoon 2.0.1 Hello! I'm trying to install Cocoon 2.0.1 with the servlet engine Tomcat 4.0.3 on Windows Millenium, but it doesn't work. This is what I've done: a) I've downloaded Cocoon on c:\cocoon (Tomcat is on c:/tomcat) b) I've copied the file c:\cocoon\cocoon.war on c:\tomcat\webapps c) I've run Tomcat d) I've written http://localhost:8080/cocoon/ on IE6 but unfortunelately, I've always the same http 500 Internal Server Error: exception javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:935) at org.apache.catalina.core.StandardWrapper.allocate(Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) and below this one root cause java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Compiled Code) at java.security.SecureClassLoader.defineClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.configur e(Compiled Code) I don't know what to do. What's wrong? Thanks a lot for your answers, Cyril. - 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: Installation Cocoon 2.0.1
Vadim, Actually, i've downloaded the Cocoon 2.0.1 binary version. Can't it really don't work by this way? Cyril. - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 7:56 PM Subject: RE: Installation Cocoon 2.0.1 From: cyril vidal [mailto:[EMAIL PROTECTED]] Vadim, thanks for the tip. I've read your tutorial. Bu I don't find the cocoon directory you're talking about in step 2 : xml-cocoon2\lib\core -:(. Could you please tell me how to see it? I apologize for these really basics questions... xml-cocoon2 referes to place were *source Cocoon distribution* is installed. If you don't have lib/core, you must have at least lib/. If you have binary distribution, try source one. Snapshot is available from http://cvs.apache.org/snapshots/xml-cocoon2/, or download release: http://xml.apache.org/cocoon/dist/cocoon-2.0.1-src.zip Vadim Cyril. - Original Message - From: Vadim Gritsenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 14, 2002 6:32 PM Subject: RE: Installation Cocoon 2.0.1 Read http://marc.theaimsgroup.com/?t=10150987843r=1w=2 Vadim -Original Message- From: cyril vidal [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: Installation Cocoon 2.0.1 Hello! I'm trying to install Cocoon 2.0.1 with the servlet engine Tomcat 4.0.3 on Windows Millenium, but it doesn't work. This is what I've done: a) I've downloaded Cocoon on c:\cocoon (Tomcat is on c:/tomcat) b) I've copied the file c:\cocoon\cocoon.war on c:\tomcat\webapps c) I've run Tomcat d) I've written http://localhost:8080/cocoon/ on IE6 but unfortunelately, I've always the same http 500 Internal Server Error: exception javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:935) at org.apache.catalina.core.StandardWrapper.allocate(Compiled Code) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) and below this one root cause java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Compiled Code) at java.security.SecureClassLoader.defineClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.findClass(Compiled Code) at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.configur e(Compiled Code) I don't know what to do. What's wrong? Thanks a lot for your answers, Cyril. - 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] - 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]