From: Richard L. <ric...@fa...> - 2004-11-29 15:51:36
|
How do I pass a parameter from the sitemap to an xquery using the XQueryGenerator? I've got: sitemap.xmap: <map:match pattern="body/*"> <map:generate type="xquery" src="xquery/get-section.xq"> <map:parameter name="section-id" value="{1}" /> </map:generate> <map:serialize type="xml" /> </map:match> and the get-section.xq file: xquery version "1.0"; declare namespace request="http://exist-db.org/xquery/request"; <param name="section">{request:request-parameter('section-id','none')}</param> The resulting document will always be: <param name="section">none</param> I've tried putting the parameters as a query string to the generator source ('..ion.xq?section=...') but that doesn't work and I've tried to see if the parameter is available as an XQuery variable but its not. I know this is probably really simple but I can't seem to find the answer anywhere. Thanks in advnace, Richard -- Richard Lewis ric...@fa... |