Just an idea, I am busy yet : use an Action and getParameterNames() method if I remember well (look at the API docs), so that you have all the request parameters. Then you can put sitemap parameters as you want.
HTH, Babs ----- Original Message ----- From: "Erik Norvelle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 19, 2002 12:18 PM Subject: Impossible or not? Combining request-parameter & wildcard matchers in 1 pipeline > ************************ Problem Summary ************************** > I cannot figure out how to use matchers to capture an arbitrary > number of request-parameters, in combination with using a wildcard > matcher to parse the structure of the request URI. I seem to be > limited to capturing only a single request-parameter at once, in > a situation when the number & names of parameters is not predictable. > ******************************************************************* > > Here's a more complete description of my problem: > > I need to combine two kinds of matching in my sitemap, and so far neither > the documentation or sample sitemap can tell me how to accomplish it. There > are _two conditions_ that my pipeline needs to meet, and I can't figure out > how to meet them both at once: > > 1) Parsing the URI into its components, which I use to determine both the > data source (i.e. the url for the map:generate tag) and the particular > stylesheet that will get applied (the map:transform tag). > 2) Acquiring *all* of the request parameters appended to the path portion of > the URI, and passing these parameters on as part of the URI for the > map:generate tag. For example, a filtering form might specify > "subject=Goats", "location=Tucson" and > "dateStart=10-09-02&dateEnd=10-20-02". > > Here's a sample pipeline which just uses the wildcard URI matcher: > ----------- Code snip ---------------------- > <map:match pattern="*/*/*.*.html*"> > <map:generate type="file" > src="http://localhost:8000/{1}/CalendarRegistry/{2}/EventCollection/getCatal oguedEventsAsXML"/> > <map:transform > src="http://localhost:8080/mightycal/{1}/{2}/{3}/intermediate-to-html.{4}.xs l"/> > <map:serialize/> > </map:match> > ------------ End code snip ----------------- > > To add one of the request parameters, I could wrap the above <map:match> tag > in another matcher, e.g.: <map:match pattern="filter" > type="request-parameter">. The problem with this solution is that it only > gets me *one* of the potentially five or six parameters that might be passed > as part of the request. Do I have to wrap this matcher inside a separate > matcher for each parameter, so that I end up with a matcher structure that > is 6 levels deep? That seems crazy. It also doesn't allow for situations > where only *some* of the parameters are present, and not others. > > What would work best is a matcher or other mechanism that would clump all of > the request parameters together in a single sstring, which I could then > append to the main <map:generate> component of my pipeline. > > Can this be done with the existing matchers? Do I have to use actions? Or > do I have to write my own custom matcher? > > Thanks in advance for advice. > > Erik Norvelle > ================================================================== > Support Systems Analyst > College of Agriculture and Life Sciences > The University of Arizona > > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>