[XQZone General] Xquery Related Question
Sandesh Pai
meetpai at gmail.com
Tue Dec 13 07:09:29 PST 2005
Thanks for the quick reply,
But don't we have any Xquery buillt-in function for this
Regards
Sandesh
On 12/13/05, Stewart, Joel (LNG-DAY) <joel.stewart at lexisnexis.com> wrote:
> You can use the xdmp:eval()
>
> Essentially build a string of the query and call it
>
> Let $bool_op := "<"
> Let $query := fn:concat("collection(""collectionName"")/root/node[@value
> ",$bool_op," ]")
> Let $result := xdmp:eval($query)
>
> But beware doing it with update queries. It may commit things that you
> would normally want to rollback if there are problems further down in
> the query function.
>
> joel
>
> -----Original Message-----
> From: general-bounces at xqzone.marklogic.com
> [mailto:general-bounces at xqzone.marklogic.com] On Behalf Of Sandesh Pai
> Sent: Tuesday, December 13, 2005 9:49 AM
> To: General XQZone Discussion
> Subject: [XQZone General] Xquery Related Question
>
> Hi,
> I have one question regarding XQuery.
> Is it possible to construct the Xquery expression dynamically?
> Eg:
> collection("collectionName")/root/node[@value > 1000]
>
> Here the condition Greater Than or Less Than Depends on User input, So
> what I want is,
>
> I would like to have this query in a file which I read during run
> time and dynamically set the condition.
>
>
> Please let me know if it is possible to do and If yes please give a
> small example
>
> regards
> Sandesh
> _______________________________________________
> General mailing list
> General at xqzone.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> General at xqzone.marklogic.com
> http://xqzone.com/mailman/listinfo/general
>
More information about the General
mailing list