Re: Passing request parameter from the sitemap

2008-08-11 Thread Peter Sparkes

Kai Mütz  gave me the answer on  [EMAIL PROTECTED]

No. You are refering to a sitemap parameter not a request parameter. 
XQueryGenerator passes the parameters from sitemap to the XQuery. Thus 
you can use $myuser without declaring it.


Peter


Hi Andy,

Sorry typos in email.

sitemap extract:
map:match pattern=register-with-eXist
   map:generate src=register.xq type=xquery
  map:parameter name=user value=test/
  /map:generate

and register.xq extract:

declare namespace xdb=http://exist-db.org/xquery/xmldb;;
declare namespace request=http://exist-db.org/xquery/request;;
declare namespace session=http://exist-db.org/xquery/session;;

let $user := request:get-parameter(user, 'error'),
return
  p user  : {$user} /p

Returns   p user  : error /p

while http://localhost:8080/exist/register.xq?user=test

Returns  p user  :  test/p

Peter

2008/8/7 Peter Sparkes [EMAIL PROTECTED]:
  

I am trying to pass various request parameter from the sitemap to a eXist
xquery using:

map:match pattern=register-with-eXist
 map:generate src=register.xq type=xquery
!--map:parameter name=user value={flow-attribute:user}/--
map:parameter name=user value=test/
  /map:generate


I know the xquery is correct as I have tested it with the the URL
register.xql?pass=test



register.xq (as you have in the map:generate) or .xql?  Also, you have
pass=test in the URL but name=user value=test in the
map:parameter.  Are those what you're actually using or just typos in
your email?


Andy.
  




No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.5.12/1599 - Release Date: 07/08/2008 20:49
  





No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.5.12/1599 - Release Date: 07/08/2008 20:49
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing request parameter from the sitemap

2008-08-08 Thread Andy Stevens
2008/8/7 Peter Sparkes [EMAIL PROTECTED]:
 I am trying to pass various request parameter from the sitemap to a eXist
 xquery using:

 map:match pattern=register-with-eXist
  map:generate src=register.xq type=xquery
 !--map:parameter name=user value={flow-attribute:user}/--
 map:parameter name=user value=test/
   /map:generate


 I know the xquery is correct as I have tested it with the the URL
 register.xql?pass=test

register.xq (as you have in the map:generate) or .xql?  Also, you have
pass=test in the URL but name=user value=test in the
map:parameter.  Are those what you're actually using or just typos in
your email?


Andy.
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku application

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing request parameter from the sitemap

2008-08-08 Thread Peter Sparkes

Hi Andy,

Sorry typos in email.

sitemap extract:
map:match pattern=register-with-eXist
  map:generate src=register.xq type=xquery
 map:parameter name=user value=test/
 /map:generate

and register.xq extract:

declare namespace xdb=http://exist-db.org/xquery/xmldb;;
declare namespace request=http://exist-db.org/xquery/request;;
declare namespace session=http://exist-db.org/xquery/session;;

let $user := request:get-parameter(user, 'error'),
   return
 p user  : {$user} /p

Returns   p user  : error /p

while http://localhost:8080/exist/register.xq?user=test

Returns  p user  :  test/p

Peter

2008/8/7 Peter Sparkes [EMAIL PROTECTED]:
  

I am trying to pass various request parameter from the sitemap to a eXist
xquery using:

map:match pattern=register-with-eXist
 map:generate src=register.xq type=xquery
!--map:parameter name=user value={flow-attribute:user}/--
map:parameter name=user value=test/
  /map:generate


I know the xquery is correct as I have tested it with the the URL
register.xql?pass=test



register.xq (as you have in the map:generate) or .xql?  Also, you have
pass=test in the URL but name=user value=test in the
map:parameter.  Are those what you're actually using or just typos in
your email?


Andy.
  




No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.5.12/1599 - Release Date: 07/08/2008 20:49
  




Passing request parameter from the sitemap

2008-08-07 Thread Peter Sparkes

Hi,

I am trying to pass various request parameter from the sitemap to a eXist xquery 
using:


map:match pattern=register-with-eXist
  map:generate src=register.xq type=xquery   
 !--map:parameter name=user value={flow-attribute:user}/--

 map:parameter name=user value=test/
   /map:generate


I know the xquery is correct as I have tested it with the the URL 
register.xql?pass=test

Help please, how do I pass parameters from the sitemap as request parameters?

Thanks

Peter


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]