RE: XQuery parameters

Thank you for your comments Michael.
Best regards
 
 
Stéphane
Mbaye
  _____  

 
GAEL Consultant 
Cité Descartes
18, rue Albert Einstein
77420 Champs-sur-Marne
France 
Software Director
 
mailto:stephane.mbaye@gael.fr
http://www.gael.fr 
 
 
tel +33-(0)1 64 73 99 55
fax +33-(0)1 64 73 51 60
 
 
 
 
 
-----Message d'origine-----
De : Michael Rys [mailto:mrys@microsoft.com]
Envoyé : lundi 18 novembre 2002 21:41
À : Stéphane Mbaye; XQuery
Objet : RE: XQuery parameters
 
Dear Stephane
 
Note that I am not saying yet whether such a mechanism will be part, just that we consider it.
 
Note that the workaround would mean that every user would have to write his own function. There is no preferred function name and signature (like C’s main()). One of the mechanism under consideration would be to require such a standard function name, while others are to simply allow the binding of variables into the evaluation context using a declaration in the query prolog.
 
With the Nov 15th working draft, you are already allowed to add externally variables to the XQuery static and dynamic contexts as predefined variables. That is helpful if you embed your query in a static way into your programming language.
 
Best regards
Michael
 
-----Original Message-----
From: Stéphane Mbaye [mailto:stephane.mbaye@gael.fr] 
Sent: Monday, November 18, 2002 9:57 AM
To: XQuery
Subject: RE: XQuery parameters
 
Dear Michael,
 
thank your for your answer. I am happy that a parameter mechanism will be part of XQuery language.
I believe the workaround you’ve proposed is a good temporary solution until the XQuery language will
specify the mechanism. I will have no problem to wrap an expression into a parameterized function
because it is our implementation of XQuery engine (i.e. http://www.gael.fr/drb ).
 
However in order to minimize the changes on XQuery scripts using the workaround solution when the
mechanism will be explicitly specified in the XQuery language, may you provide me with trends about
the function name and prototype ?
 
Thank you in advance for your help.
Best regards.
 
 
Stéphane
Mbaye
  _____  

 
 
GAEL Consultant 
Cité Descartes
18, rue Albert Einstein
77420 Champs-sur-Marne
France 
Software Director
 
mailto:stephane.mbaye@gael.fr
http://www.gael.fr 
 
 
tel +33-(0)1 64 73 99 55
fax +33-(0)1 64 73 51 60
 
 
 
 
 
-----Message d'origine-----
De : www-ql-request@w3.org [mailto:www-ql-request@w3.org]De la part de Michael Rys
Envoyé : jeudi 14 novembre 2002 19:41
À : Stéphane Mbaye; XQuery
Objet : RE: XQuery parameters
 
Dear Stephane
 
Thanks for your comment and suggestion. We are currently indeed looking into such mechanisms.
 
Although as a workaround, you could always wrap your XQuery expression into a parameterized function and provide the function parameter as part of your function invocation (this assumes that the XQuery API provides a way to call an XQuery function directly).
 
Best regards
Michael
 
-----Original Message-----
From: Stéphane Mbaye [mailto:stephane.mbaye@gael.fr] 
Sent: Thursday, November 14, 2002 6:55 AM
To: XQuery
Subject: XQuery parameters
 
Dear Sirs,
 
does the XQuery language foresee a mechanism for parameters set outside the query script ?
Such a system would enable the evaluation of queries from different documents or with different
extents, constants, etc. without modifying the source code of the query.
 
The parameter may be atomic values, possibly labeled or identified by a QName and have a default value
such as attributes of XML elements.
 
As an example a parameterized query may be :
 
<authlist>
 {
   let $input := document( parameter(“inputDocument”,xsd:anyURI,”bibl.xml”) <!—THE PARAMETER -->
   for $a in distinct-values($input//author)
   return
     <author>
      {
        <name>
           { $a/text() }
        </name>,
        <books>
         {
           for $b in $input//book
           where $b/author = $a
           return $b/title 
         }
        </books>
      }
     </author>
 }
</authlist>
 
Best regards
 
 
Stéphane
Mbaye
  _____  

 
 
GAEL Consultant 
Cité Descartes
18, rue Albert Einstein
77420 Champs-sur-Marne
France 
Software Director
 
mailto:stephane.mbaye@gael.fr
http://www.gael.fr 
 
 
tel +33-(0)1 64 73 99 55
fax +33-(0)1 64 73 51 60
 
 
 
 
 

Received on Wednesday, 20 November 2002 06:15:21 UTC