Please look into matchers which cocoon provides. One which will work for
exactly the situation you are describing is RequestParameterMatcher. If
you define it with name 'request-parameter' then pipeline will look
like:
map:match pattern=/app
map:match type=request-parameter pattern=color
map:generate src=http://server/xml_generator?color={1}/
map:transform src=document2html.xsl/
map:serialize/
/map:match
/map:match
Vadim
-Original Message-
From: Tom Loebach [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: sitemap construction help
This is probably a pretty basic question but I am having a had time
figuring out how to create a sitemap entry that handles the following
situation.
I want to send cocoon a URI that looks like this:
http://server:8080/cocoon/app?color=red (or)
http://server:8080/cocoom/app?color=blue
I have a server that generates XML based upon a generator request that
looks like this:
http://server/xml_generator?color=red (or)
http://server/xml_generator?color=blue
My xml_generator is a service that provides different XML output based
upon the value of the color variable.
My question is How do I write the sitemap entry when I want to pass
variables in the URI?
A sitemap entry that works but is undesirable is this:
map:match pattern=/appred
map:generate src=http://server/xml_generator?color=red/
map:transform src=document2html.xsl/
map:serialize/
/map:match
I want to write a sitemap entry that looks like this but it does not
work. I want to be able to have a variable in the URI be passed to the
generator.
map:match pattern=/app*
map:generate src=http://server/xml_generator{1}/
map:transform src=document2html.xsl/
map:serialize/
/map:match
So if I sent cocoon a URI like this; http://server/app?color=red, I
would expect the generator to send a request that looks like this;
http://server/xml_generator?color=red.
Does anyone have any tips on how I can write the sitemap entry to allow
for variables?
Thanks,
-tom
-
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]