You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Martin Holmes <mh...@uvic.ca> on 2007/09/21 20:39:58 UTC

Passing parameters into XQuery

HI there,

Using Cocoon 2.1.10:

I'm trying to pass the value of the original URI requested by the 
browser into an XQuery generator, and I have two problems. First, I 
can't seem to pass any parameter value into the XQuery at all:

<map:generate src="xq/contents.xq" type="xquery">
	<map:parameter name="pageUri" value="blah" />
</map:generate>

The parameter doesn't make it into the XQuery, for some reason. (GET 
values from the URI are all available, though.)

Secondly, I'm not sure how to get the full URI of the page. With a match 
pattern like this:

<map:match pattern="stuff/*.xml">
	<map:generate src="xq/contents.xq" type="xquery">
		<map:parameter name="pageUri" value="{WHAT?}" />
	</map:generate>
[...]
</map:match>

where the URL might have a long search string:

http://...stuff/contents.xml?sort=date_asc&author=smith&vol=39

what would I use to retrieve the full URL?

All help appreciated,
Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org