simple question
Hi guys, I'm trying to use the xsl:output element in my logicsheet (for an accompanying XSP) to remove the XML declaration (the ?xml version=1.0?) from my output doc. I just put xsl:output method=xml omit-xml-declaration=yes/ right inside my opening xsl:stylesheet tag. However, in the processing of the stylesheet itself, this ProcessingException is thrown: org.apache.cocoon.ProcessingException: Exception during processing of file:/jakarta-tomcat-4.1.12/webapps/cocoon/mysite/stylesheets/my_logicsheet.xsl: java.io.UTFDataFormatException: invalid byte 1 of 1-byte UTF-8 sequence (0xa0) I also tried adding the 'encoding=UTF-8' attribute/value to the xsl:output tag, but I got the same error. Can anyone shed some light on this for me? Thanks, Sonny _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: simple question
you have to do this in the setup of the serializer in sitemap.xmap. See the docs for details. Remember if you need some pipelines to use different settings, you can set up the same serializer class under different pipeline shortcut names with different configs. You may be able to do this per-pipeline inside map:serialize but I don't know about that. HTH, Geoff Howard -Original Message- From: Sonny Sukumar [mailto:[EMAIL PROTECTED] Sent: Saturday, June 21, 2003 6:08 PM To: [EMAIL PROTECTED] Subject: simple question Hi guys, I'm trying to use the xsl:output element in my logicsheet (for an accompanying XSP) to remove the XML declaration (the ?xml version=1.0?) from my output doc. I just put xsl:output method=xml omit-xml-declaration=yes/ right inside my opening xsl:stylesheet tag. However, in the processing of the stylesheet itself, this ProcessingException is thrown: org.apache.cocoon.ProcessingException: Exception during processing of file:/jakarta-tomcat-4.1.12/webapps/cocoon/mysite/stylesheets/my_l ogicsheet.xsl: java.io.UTFDataFormatException: invalid byte 1 of 1-byte UTF-8 sequence (0xa0) I also tried adding the 'encoding=UTF-8' attribute/value to the xsl:output tag, but I got the same error. Can anyone shed some light on this for me? Thanks, Sonny _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple question
you can find the access times in the logfile WEB-INF/logs/access.log hussayn Jordi Valldaura wrote: I used cocoon 1.8.* in the past, now I'm using 2.0.4. In the first one each generated page had a line with the time cocoon taked to generate it. I dont see this line in cocoon 2 generated pages is there any easy way to know how much time takes cocoon to generate a page??? - 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] -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 E-Mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple question
Thank you very much, but I don't want the acces times I want the time cocoon takes to generate a page. I am comparing cocoon and the jstl from jakarta that what I need the time it takes to generate a page. If someone can point me to some comparative I would apreciate it. Thanks in advande -Jordi - Original Message - From: SAXESS - Hussayn Dabbous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 28, 2003 9:08 PM Subject: Re: simple question you can find the access times in the logfile WEB-INF/logs/access.log hussayn Jordi Valldaura wrote: I used cocoon 1.8.* in the past, now I'm using 2.0.4. In the first one each generated page had a line with the time cocoon taked to generate it. I dont see this line in cocoon 2 generated pages is there any easy way to know how much time takes cocoon to generate a page??? - 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] -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 E-Mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
AW: simple question
Jordi, the processing time is written to WEB-INF/logs/core.log Of course it depends on your logging configuration, but with the default it should be there. Otherwise have a look at you logkit.xconf file. The log entries in our core.log typically look like this: INFO(2003-01-28) 17:53.13:459 [access] (/medizinische-berufe/view/JobIndex.htm) HttpProcessor[8080][3]/CocoonServlet: 'view/JobIndex.htm' Processed by Apache Cocoon 2.0.4 in 79 milliseconds. -Jan Dipl. Inf. Jan Harms Software Developer VIVAI Software AG Königswall 1 44137 Dortmund Germany phone +49-231-914488-50 email jan.harms_at_vivai.de url http://www.vivai.de -Ursprüngliche Nachricht- Von: Jordi Valldaura [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 28. Januar 2003 21:31 An: [EMAIL PROTECTED] Betreff: Re: simple question Thank you very much, but I don't want the acces times I want the time cocoon takes to generate a page. I am comparing cocoon and the jstl from jakarta that what I need the time it takes to generate a page. If someone can point me to some comparative I would apreciate it. Thanks in advande -Jordi - Original Message - From: SAXESS - Hussayn Dabbous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 28, 2003 9:08 PM Subject: Re: simple question you can find the access times in the logfile WEB-INF/logs/access.log hussayn Jordi Valldaura wrote: I used cocoon 1.8.* in the past, now I'm using 2.0.4. In the first one each generated page had a line with the time cocoon taked to generate it. I dont see this line in cocoon 2 generated pages is there any easy way to know how much time takes cocoon to generate a page??? - 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] -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 E-Mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
AW: simple question
hi jordi, please have a look at cocoon's web.xml. there's an init-param named show-time, which, when set to yes/true makes cocoon add the processing time to each response. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Jordi Valldaura Gesendet: Dienstag, 28. Januar 2003 20:55 An: [EMAIL PROTECTED] Betreff: simple question I used cocoon 1.8.* in the past, now I'm using 2.0.4. In the first one each generated page had a line with the time cocoon taked to generate it. I dont see this line in cocoon 2 generated pages is there any easy way to know how much time takes cocoon to generate a page??? - 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: simple question
I think there's also a setting hide which causes the time to be hidden in an xml/html comment. Geoff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 5:48 PM To: [EMAIL PROTECTED] Subject: AW: simple question hi jordi, please have a look at cocoon's web.xml. there's an init-param named show-time, which, when set to yes/true makes cocoon add the processing time to each response. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Jordi Valldaura Gesendet: Dienstag, 28. Januar 2003 20:55 An: [EMAIL PROTECTED] Betreff: simple question I used cocoon 1.8.* in the past, now I'm using 2.0.4. In the first one each generated page had a line with the time cocoon taked to generate it. I dont see this line in cocoon 2 generated pages is there any easy way to know how much time takes cocoon to generate a page??? - 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: simple question about RequestSelector
From: Cyril Vidal [EMAIL PROTECTED] snip/ 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... Start from here: http://xml.apache.org/cocoon/userdocs/transformers/i18n-transformer.html and then take a look at i18n samples in /src/webapp/samples/i18n/ -- Konstantin 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] - 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
Cyril Vidal wrote: 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. While this is no answer to your question, it might still be helpful. Say you are using at least 2.0.4 and are able to either rename your xsl or the parameter value so that they match. Then you could do map:match pattern= map:generate src=documents/participants.xml/ map:transform src=stylesheets/participants{request-param:language}.xsl map:parameter name=tri value={request-param:critere}/ /map:transform map:serialize type=html/ /map:match The so called input modules are available like any other variable from the sitemap. Regarding the original question, I believe the use-request-parameters configuration needs to go into the configuration section and not into the pipeline. 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. 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]
AW: simple question about RequestSelector
hi cyril, the problem is the '{critere}'. you have no sitemap component creating this sitemap variable. but in this case you don't need that anyway since you are instructing the XSLT-/TraxTransformer to 'use-request-parameters', i.e. make all request parameters available to the stylesheet as stylesheet params. to be able to access 'critere' within the stylesheet then, declare it at the head of your stylesheet (xsl:param name=critere/). should you need the parameter to be named 'tri', the simple solution would be a xsl:param name=tri select=$critere/. HTH -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Cyril Vidal Gesendet: Samstag, 25. Januar 2003 13:52 An: [EMAIL PROTECTED] Betreff: 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] - 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
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]
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]
simple question about StreamGenerator
What does the "form-name" parameter mean in the context of the Stream Generator? Oskar
RE: simple question about StreamGenerator
Oskar, StreamGenerator is expectingits input as a HTTP POST input. There aretwo scenarios: -For the POST requests with mime type of application/x-www-form-urlencoded the xml data is expected to be associated with the name specified in the sitemap parameter. - For the POST requests with mime types: text/plain, text/xml, application/xml the xml data is in the body of the POST request and its length is specified by the value returned by getContentLength() method. For the first scenario, the one way to generate HTTP POST message is to use http page with a Form method="post" tag. The xml load intended to be processed by StreamGenerator needs to be associated with some control inside the Form.For ex. this controlcan bea textarea containing xml document. The StreamGenerator will pull the xmlload out of the control which name matches the value attribute of "form-name" paramspecified in the sitemap. If the xml document is posted to the Cocoon using other means with mime types: text/plain, text/xml, application/xml the form-name is ignored. Kinga -Original Message-From: Oskar Casquero [mailto:[EMAIL PROTECTED]]Sent: Monday, October 21, 2002 2:32 PMTo: [EMAIL PROTECTED]Subject: simple question about StreamGenerator What does the "form-name" parameter mean in the context of the Stream Generator? Oskar