Carlos Maté | 2 Oct 2006 10:31
Picon

Re: Applet Servlet communication

Hi,
My applet expects a string as an answer.
In the sitemap I want to call a function than  calculates the string  and send this string to the applet.
I don't want to serialize any xml document. And if the function is a flowscript I don't know how to do it.
Thanks.
 
 
 
 
Hi Carlos,
what does your applet expect as an answer? an XML document, a string or something else? I think the following two pages wil be of help for you: http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html http://cocoon.apache.org/2.1/userdocs/concepts/sitemap/sitemap-examples.html Regards, Jeroen Reijn Carlos Maté wrote:
Hi. We hava an applet that needs some data. The applet ask for it using a URLConnection. And wait for the answer using urlConnection.getInputStream(); Cocoon servlet matches this URL in the sitemap but How can I send de answer ? How do I write the sitemap? Thanks.
Carlos Maté | 2 Oct 2006 10:39
Picon

RE: Applet Servlet communication



Hi,
My applet expects a string as an answer.
In the sitemap I want to call a function than  calculates the string  and send this string to the applet.
I don't want to serialize any xml document. And if the function is a flowscript I don't know how to do it.
Thanks.
 
 
 
 
Hi Carlos,
what does your applet expect as an answer? an XML document, a string or something else? I think the following two pages wil be of help for you: http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html http://cocoon.apache.org/2.1/userdocs/concepts/sitemap/sitemap-examples.html Regards, Jeroen Reijn Carlos Maté wrote:
Hi. We hava an applet that needs some data. The applet ask for it using a URLConnection. And wait for the answer using urlConnection.getInputStream(); Cocoon servlet matches this URL in the sitemap but How can I send de answer ? How do I write the sitemap? Thanks.
Jeroen Reijn | 2 Oct 2006 10:53
Picon

RE: XProc?

Hi Lars,

this seems very interesting! I guess this does have to go to the developers list though.
I did not find any reference or participation on the Developers list yet, so I don't think the Cocoon
community is participating yet.
I personally think that the cocoon community should participate in the XML Processing Model Working
Group, since they have a LOT of experience with XML processing and pipeline orders.

Regards,

Reijn

-----Original Message-----
From: Lars Huttar [mailto:lars_huttar <at> sil.org]
Posted At: Friday, September 29, 2006 8:33 PM
Posted To: Cocoon User List
Conversation: XProc?
Subject: XProc?

Hello Cocooners,

Maybe this is a question for the dev list but...
given the announcement below, that W3C is working on a standard for an XML pipeline language "to specify the
order, parameters, and expected results of transformations in a standard way", is this something that is
likely to make its way into Cocoon?
Should Cocoon support XProc?

Is the Cocoon community contributing to this standardization effort based on our experience with XML pipelining?

Lars

(From: XML Daily Newslink. Friday, 29 September 2006
A Cover Pages Publication http://xml.coverpages.org/
Provided by OASIS http://www.oasis-open.org
Edited by Robin Cover)

W3C Introduces XProc: An XML Pipeline Language
Norman Walsh (ed), W3C Working Draft

W3C has announced the publication of a First Public Working Draft for
"XProc: An XML Pipeline Language." The draft was produced my members of
the XML Processing Model Working Group as part of the W3C XML Activity.
That working group was chartered to address a range concerns that are
not formally defined in the XML Recommendation itself, for example,
ability to specify the order, parameters, and expected results of
transformations in a standard way. XSLT, XML Schema, XInclude, XML
Canonicalization, and other specifications do define transformations
that operate on and produce XML documents. However, the order in which
these transformations are to be applied is not specified anywhere,
even though applying them in different orders will in general yield
different results. The draft "XProc: An XML Pipeline Language" document
begins to address concerns presented in the W3C "XML Processing Model
Requirements and Use Cases" specification, released in April 2006. From
the XProc Introduction: "An XML Pipeline specifies a sequence of
operations to be performed on a collection of input documents. Pipelines
take zero or more XML documents as their input and produce zero or more
XML documents as their output. Steps in the pipeline may read or write
non-XML resources as well. A pipeline consists of components. Like
pipelines, components take zero or more XML documents as their input
and produce zero or more XML documents as their output. The inputs to a
component come from the web, from the pipeline document, from the inputs
to the pipeline itself, or from the outputs of other components in the
pipeline. The outputs from a component are consumed by other components,
are outputs of the pipeline as a whole, or are discarded. There are two
kinds of components: steps and (language) constructs. Steps carry out
single operations and have no substructure as far as the pipeline is
concerned, whereas constructs can include components within themselves.

http://www.w3.org/TR/xproc/
See also Norm Walsh's blog: http://norman.walsh.name/2006/09/28/xprocfpwd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org
Jeroen Reijn | 2 Oct 2006 12:56
Picon

Re: Applet Servlet communication


Carlos Maté wrote:
> 
> 
> Hi,
> My applet expects a string as an answer.
> In the sitemap I want to call a function than  calculates the string  
> and send this string to the applet.
> I don't want to serialize any xml document. And if the function is a 
> flowscript I don't know how to do it.
> Thanks.
>  
>  

Hi Carlos,

returning a string from cocoon is no problem. This is what you could do 
in your sitemap.xmap:

1. Create matcher for your request:

<map:match pattern="request-string.html">
   <map:call function="testfunction"/>
</map:match>

2. Create a flowscript function that does just does something with your 
request and calls another pipeline that returns your calculated string:

function testfunction()
{
   var something = "test";
   cocoon.sendPage("returnstring.html", {something:something});
}

See: http://cocoon.apache.org/2.1/userdocs/flow/sitemap.html for more 
information.

3. Define the matcher that generates your string:

<map:match pattern="returnstring.html">
   <map:generate src="test.xml" type="jx"/>
   <map:serialize type="text" mime-type="text/plain"/>
</map:match>

In this case the test.xml is a jx template that should look something like:

<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    ${something}
</jx:template>

I hope this helps you out.

Kind regards,

Jeroen Reijn
Hippo

>  
>  
> Hi Carlos,
> what does your applet expect as an answer? an XML document, a string or 
> something else?
> 
> I think the following two pages wil be of help for you:
> 
> http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html
>  <http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html>
> 
> http://cocoon.apache.org/2.1/userdocs/concepts/sitemap/sitemap-examples.html
>  <http://cocoon.apache.org/2.1/userdocs/concepts/sitemap/sitemap-examples.html>
> 
> Regards,
> 
> Jeroen Reijn
> 
> Carlos Maté wrote:
> 
>     Hi.
> 
>     We hava an applet that needs some data. The applet ask for it using
>     a URLConnection. And wait for the answer using
> 
>     urlConnection.getInputStream();
> 
>     Cocoon servlet matches this URL in the sitemap but How can I send de
>     answer ?
> 
>     How do I write the sitemap?
>     Thanks.
> 
James Holstead | 2 Oct 2006 16:10

RE: runtime error: xmlserializer not found

I'm running j2se 1.5 using netbeans IDE and it's built in tomcat55. My
webpages folder WEB-INF/lib includes:  xml-apis-1.3.03, xalan-2.7.0,
xercesImpl-2.8.0 jars. I copied these to the
%tomcat_home%\common\endorsed and restarted tomcat. Same error results.
Any red flags pop up ?

-----Original Message-----
From: Jeroen Reijn [mailto:j.reijn <at> hippo.nl] 
Sent: Friday, September 29, 2006 3:31 AM
To: users <at> cocoon.apache.org
Subject: Re: runtime error: xmlserializer not found

Hi James,

yes it looks like Xerces isn't in your classpath or lib directory of you
application server. Can you confirm this? I guess your problem should go
away after adding the jar and restarting tomcat.

Did you try the suggestions from the cocoon documentation about tomcat
,Xerces and j2se 1.4?

It states:

"Cocoon requires more recent versions of the Xerces and Xalan libraries
than those shipped with j2se 1.4. To override bundled libraries, follow
these steps:

1. Create %JAVA_HOME%\jre\lib\endorsed directory. (Tomcat users use
%TOMCAT_HOME\common\endorsed instead) 2. Copy xercesXXX.jar,
xalan-XXX.jar, and the xml-apis.jar from the .\lib\endorsed\ to the new
directory created above.

See http://cocoon.apache.org/2.1/installing/index.html for more
information

Regards,

Reijn

James Holstead wrote:
> Envo: Cocoon219, Hibernate, Tc5.5
>  
> This is a configuration question that may not belong here, but after a

> full day of searching I'm left wondering if there is a conflicting jar

> with the org.apache.xml package somewhere. Any help or direction is 
> appreciated. I'll say this in advance, because the error looks fairly 
> obvious at first: xerces is in my nb project classpath.
>  
> The code:
>  
>       <fd:action id="test">
>             <fd:label>Push Me</fd:label>
>             <fd:on-action>
>                 <fd:javascript>
>                     // get the counties as xml
>                     importPackage(com.testcocoon.utilities.data);
>                     importPackage(org.apache.xml.serialize); //added 
> this line, doesn't help...why? In fact: If a try to import the class 
> XMLSerializer, it complains thats its a class and not a package.
> 
>                     var countyData = new StaticDataCounties(); 
> //returns object with county data
>                     var data = countyData.currentObject(); //ERROR 
> Line95, returns a CastorMarshaller.getXML()
> 
>                     var parent = event.source.parent;
>                     parent.lookupWidget("output").setValue(data);
>  
>                     //ds is hibernate datasource
>                     var peopleList = ds.getObjects("from 
> com.testcocoon.dataobjects.PersonDO as o order by 
> o.persLastName",0,10);
> 
>                     var peopleWidget =  parent.lookupWidget("people");
>                     peopleWidget.setSelectionList(peopleList,
> "personID","persLastName");
> 
>                 </fd:javascript>
>             </fd:on-action>
>         </fd:action>
>  
>  
> The error:
> 
> java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
>  
> Cocoon stacktrace[hide]
>  
> at handleEvent
> (file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/e
> dit_childcare_facility_model.xml,
> Line 95):
> java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> it_childcare_facility_model.xml
> - 95:-1
> 
> Error calling continuation
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> it_childcare_facility_model.xml
> - 95:-1 [JavaScriptException]
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> it_childcare_facility_model.xml
> - 95:-1
> resource://org/apache/cocoon/forms/flow/javascript/Form.js - 168:-1 
> resource://org/apache/cocoon/forms/flow/javascript/Form.js - 0:-1 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/prefs.js

> -
> 0:-1
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/sitemap.
> xmap
> - 127:47 <map:call>
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/sitemap.xmap

> -
> 188:68 <map:mount>
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/sitemap.xmap -
> 969:66 <map:mount>
>  
> Java stacktrace[hide]
>  
> java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
>  at 
> org.exolab.castor.xml.Unmarshaller.initConfig(Unmarshaller.java:272)
>  at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:225)
>  at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:212)
>  
>  
> Thanks for any input, even if you have to kick me to a hibernate or 
> castor thread....I'm a bit lost!
>  
> *James Holstead*
> Software Engineer
> Tybrin Corporation
> tybrin.com
> 850.337.2718
>  
> This e-mail and any files transmitted with it are the property of 
> TYBRIN Corporation, are confidential, and are intended solely for the 
> use of the individual or entity to which this email is addressed. If 
> you are not one of the named recipient(s) or otherwise have reason to 
> believe that you have received this message in error, please delete 
> this message immediately. Any other use, retention, dissemination, 
> forwarding, printing, or copying of this e-mail is strictly
prohibited.
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org
Peter Flynn | 2 Oct 2006 16:47
Picon

use-request-parameters with checkboxes

I'm trying to handle form data from a plain HTML form which is normally
(outside Cocoon) returned in the format

http://foo.bar/cgi-bin?field=value&stuff=abc#def#ghi&more=bar

where the values of selected checkboxes are concatenated with # to
separate the values.

If I change the action attribute of the form element to point to my
Cocoon (using a URI defined in my sitemap.xmap with 
use-request-parameters), it appears that Cocoon silently munges these 
into the format

http://foo.bar/cgi-bin?field=value&stuff=abc&stuff=def&stuff=ghi&more=bar

This makes the data unusable, as the XSLT receives only one value for 
the parameter stuff (the first) and drops the othes on the floor.

Is there a switch which will make the request parameters behave normally?

///Peter
Jeroen Reijn | 2 Oct 2006 16:56
Picon

RE: use-request-parameters with checkboxes

Hi Peter,

splitting values based on #'s isn't the best solution imho. I guess that you could use the request generator
for your purpose. It should give you the values based on the uri you provide.

Regards,

Reijn

-----Original Message-----
From: Peter Flynn [mailto:pflynn <at> ucc.ie]
Posted At: maandag 2 oktober 2006 16:48
Posted To: Cocoon User List
Conversation: use-request-parameters with checkboxes
Subject: use-request-parameters with checkboxes

I'm trying to handle form data from a plain HTML form which is normally
(outside Cocoon) returned in the format

http://foo.bar/cgi-bin?field=value&stuff=abc#def#ghi&more=bar

where the values of selected checkboxes are concatenated with # to
separate the values.

If I change the action attribute of the form element to point to my
Cocoon (using a URI defined in my sitemap.xmap with 
use-request-parameters), it appears that Cocoon silently munges these 
into the format

http://foo.bar/cgi-bin?field=value&stuff=abc&stuff=def&stuff=ghi&more=bar

This makes the data unusable, as the XSLT receives only one value for 
the parameter stuff (the first) and drops the othes on the floor.

Is there a switch which will make the request parameters behave normally?

///Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
For additional commands, e-mail: users-help <at> cocoon.apache.org
Peter Flynn | 2 Oct 2006 17:19
Picon

Re: use-request-parameters with checkboxes

Jeroen Reijn wrote:
> Hi Peter,
> 
> splitting values based on #'s isn't the best solution imho. 

I agree, but for a very simple application it's easy enough
using contains($ref, <at> id) to identify the elements needed.

> I guess that you could use the request generator for your purpose. 
 > It should give you the values based on the uri you provide.

Ah...I'm missing something there. Is there an example I can see?

///Peter

> 
> -----Original Message-----
> From: Peter Flynn [mailto:pflynn <at> ucc.ie]
> Posted At: maandag 2 oktober 2006 16:48
> Posted To: Cocoon User List
> Conversation: use-request-parameters with checkboxes
> Subject: use-request-parameters with checkboxes
> 
> 
> I'm trying to handle form data from a plain HTML form which is normally
> (outside Cocoon) returned in the format
> 
> http://foo.bar/cgi-bin?field=value&stuff=abc#def#ghi&more=bar
> 
> where the values of selected checkboxes are concatenated with # to
> separate the values.
> 
> If I change the action attribute of the form element to point to my
> Cocoon (using a URI defined in my sitemap.xmap with 
> use-request-parameters), it appears that Cocoon silently munges these 
> into the format
> 
> http://foo.bar/cgi-bin?field=value&stuff=abc&stuff=def&stuff=ghi&more=bar
> 
> This makes the data unusable, as the XSLT receives only one value for 
> the parameter stuff (the first) and drops the othes on the floor.
> 
> Is there a switch which will make the request parameters behave normally?
> 
> ///Peter
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
Geert Josten | 2 Oct 2006 17:36
Picon

RE: runtime error: xmlserializer not found

Perhaps the IDE is running tomcat in its own JVM and this causes the
commen/endorsed libraries to be loaded after the libraries from the JVM
itself? I would recommend as test running tomcat outside the IDE and see
whether the error occurs there as well.

If you are really keen on working within the IDE, you might have more
succes with using the Paranoid Cocoon servlet. Include the paranoid
block in the Cocoon build (just one additional jar I believe) and set
the servlet-class in web.xml to:

	
<servlet-class>org.apache.cocoon.servlet.ParanoidCocoonServlet</servlet-
class>

This makes sure that classes are searched in the webapp libraries first,
before looking in libraries provided through the framework.

Kind regards,
Geert

> 

 
Drs. G.P.H. Josten
Consultant

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984

De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend
bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te
verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

> Van: James Holstead [mailto:James.Holstead <at> tybrin.com] 
> Verzonden: maandag 2 oktober 2006 16:11
> Aan: users <at> cocoon.apache.org
> Onderwerp: RE: runtime error: xmlserializer not found
> 
> I'm running j2se 1.5 using netbeans IDE and it's built in 
> tomcat55. My webpages folder WEB-INF/lib includes:  
> xml-apis-1.3.03, xalan-2.7.0, xercesImpl-2.8.0 jars. I copied 
> these to the %tomcat_home%\common\endorsed and restarted 
> tomcat. Same error results.
> Any red flags pop up ?
> 
> -----Original Message-----
> From: Jeroen Reijn [mailto:j.reijn <at> hippo.nl]
> Sent: Friday, September 29, 2006 3:31 AM
> To: users <at> cocoon.apache.org
> Subject: Re: runtime error: xmlserializer not found
> 
> Hi James,
> 
> yes it looks like Xerces isn't in your classpath or lib 
> directory of you application server. Can you confirm this? I 
> guess your problem should go away after adding the jar and 
> restarting tomcat.
> 
> Did you try the suggestions from the cocoon documentation 
> about tomcat ,Xerces and j2se 1.4?
> 
> It states:
> 
> "Cocoon requires more recent versions of the Xerces and Xalan 
> libraries than those shipped with j2se 1.4. To override 
> bundled libraries, follow these steps:
> 
> 1. Create %JAVA_HOME%\jre\lib\endorsed directory. (Tomcat 
> users use %TOMCAT_HOME\common\endorsed instead) 2. Copy 
> xercesXXX.jar, xalan-XXX.jar, and the xml-apis.jar from the 
> .\lib\endorsed\ to the new directory created above.
> 
> See http://cocoon.apache.org/2.1/installing/index.html for 
> more information
> 
> Regards,
> 
> Reijn
> 
> James Holstead wrote:
> > Envo: Cocoon219, Hibernate, Tc5.5
> >  
> > This is a configuration question that may not belong here, 
> but after a
> 
> > full day of searching I'm left wondering if there is a 
> conflicting jar
> 
> > with the org.apache.xml package somewhere. Any help or direction is 
> > appreciated. I'll say this in advance, because the error 
> looks fairly 
> > obvious at first: xerces is in my nb project classpath.
> >  
> > The code:
> >  
> >       <fd:action id="test">
> >             <fd:label>Push Me</fd:label>
> >             <fd:on-action>
> >                 <fd:javascript>
> >                     // get the counties as xml
> >                     importPackage(com.testcocoon.utilities.data);
> >                     
> importPackage(org.apache.xml.serialize); //added 
> > this line, doesn't help...why? In fact: If a try to import 
> the class 
> > XMLSerializer, it complains thats its a class and not a package.
> > 
> >                     var countyData = new StaticDataCounties(); 
> > //returns object with county data
> >                     var data = countyData.currentObject(); //ERROR 
> > Line95, returns a CastorMarshaller.getXML()
> > 
> >                     var parent = event.source.parent;
> >                     parent.lookupWidget("output").setValue(data);
> >  
> >                     //ds is hibernate datasource
> >                     var peopleList = ds.getObjects("from 
> > com.testcocoon.dataobjects.PersonDO as o order by 
> > o.persLastName",0,10);
> > 
> >                     var peopleWidget =  
> parent.lookupWidget("people");
> >                     peopleWidget.setSelectionList(peopleList,
> > "personID","persLastName");
> > 
> >                 </fd:javascript>
> >             </fd:on-action>
> >         </fd:action>
> >  
> >  
> > The error:
> > 
> > java.lang.NoClassDefFoundError: 
> org/apache/xml/serialize/XMLSerializer
> >  
> > Cocoon stacktrace[hide]
> >  
> > at handleEvent
> > 
> (file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/e
> > dit_childcare_facility_model.xml,
> > Line 95):
> > java.lang.NoClassDefFoundError: 
> org/apache/xml/serialize/XMLSerializer
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> > it_childcare_facility_model.xml
> > - 95:-1
> > 
> > Error calling continuation
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> > it_childcare_facility_model.xml
> > - 95:-1 [JavaScriptException]
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> > it_childcare_facility_model.xml
> > - 95:-1
> > resource://org/apache/cocoon/forms/flow/javascript/Form.js - 168:-1 
> > resource://org/apache/cocoon/forms/flow/javascript/Form.js - 0:-1 
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/prefs.js
> 
> > -
> > 0:-1
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/sitemap.
> > xmap
> > - 127:47 <map:call>
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/sitemap.xmap
> 
> > -
> > 188:68 <map:mount>
> > file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/sitemap.xmap -
> > 969:66 <map:mount>
> >  
> > Java stacktrace[hide]
> >  
> > java.lang.NoClassDefFoundError: 
> org/apache/xml/serialize/XMLSerializer
> >  at
> > org.exolab.castor.xml.Unmarshaller.initConfig(Unmarshaller.java:272)
> >  at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:225)
> >  at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:212)
> >  
> >  
> > Thanks for any input, even if you have to kick me to a hibernate or 
> > castor thread....I'm a bit lost!
> >  
> > *James Holstead*
> > Software Engineer
> > Tybrin Corporation
> > tybrin.com
> > 850.337.2718
> >  
> > This e-mail and any files transmitted with it are the property of 
> > TYBRIN Corporation, are confidential, and are intended 
> solely for the 
> > use of the individual or entity to which this email is 
> addressed. If 
> > you are not one of the named recipient(s) or otherwise have 
> reason to 
> > believe that you have received this message in error, please delete 
> > this message immediately. Any other use, retention, dissemination, 
> > forwarding, printing, or copying of this e-mail is strictly
> prohibited.
> >  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
>
Jeroen Reijn | 2 Oct 2006 17:45
Picon

Re: use-request-parameters with checkboxes


Peter Flynn wrote:
> Jeroen Reijn wrote:
>> Hi Peter,
>>
>> splitting values based on #'s isn't the best solution imho. 
> 
> I agree, but for a very simple application it's easy enough
> using contains($ref, <at> id) to identify the elements needed.

Yes that's true.

> 
>> I guess that you could use the request generator for your purpose. 
>  > It should give you the values based on the uri you provide.
> 
> Ah...I'm missing something there. Is there an example I can see?

Yes you can take a look in the documentation:

http://cocoon.apache.org/2.1/userdocs/request-generator.html

It very simple to use and you can transform it.

Reijn

> 
> ///Peter
> 
> 
>>
>> -----Original Message-----
>> From: Peter Flynn [mailto:pflynn <at> ucc.ie]
>> Posted At: maandag 2 oktober 2006 16:48
>> Posted To: Cocoon User List
>> Conversation: use-request-parameters with checkboxes
>> Subject: use-request-parameters with checkboxes
>>
>>
>> I'm trying to handle form data from a plain HTML form which is normally
>> (outside Cocoon) returned in the format
>>
>> http://foo.bar/cgi-bin?field=value&stuff=abc#def#ghi&more=bar
>>
>> where the values of selected checkboxes are concatenated with # to
>> separate the values.
>>
>> If I change the action attribute of the form element to point to my
>> Cocoon (using a URI defined in my sitemap.xmap with 
>> use-request-parameters), it appears that Cocoon silently munges these 
>> into the format
>>
>> http://foo.bar/cgi-bin?field=value&stuff=abc&stuff=def&stuff=ghi&more=bar
>>
>> This makes the data unusable, as the XSLT receives only one value for 
>> the parameter stuff (the first) and drops the othes on the floor.
>>
>> Is there a switch which will make the request parameters behave normally?
>>
>> ///Peter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
>> For additional commands, e-mail: users-help <at> cocoon.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
>> For additional commands, e-mail: users-help <at> cocoon.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 

Gmane