Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is it possible to define list in XQuery ?

NicePseronMahouFeb 28 2012 — edited May 15 2013
Hi everybody,
I wish my question could be easy to someone.
Consider the following XML document:

<warehouse>
<article id="1" quantity="5"/>
<article id="2" quantity="4"/>
<article id="3" quantity="2"/>
<article id="4" quantity="7"/>
</warehouse>

This document is updated each time a new import is done.
I maintain a list of old quantities, for example, old = {4,4,2,7}+ indicates that only the first article has been updated.

For this purpose, I am trying to define a list in XQuery+ as follows: *$old := [4, 4, 2, 7]*,
and i want to use it in order to detect all updated articles, like: *//article[@quantity < $old[@id]]*.
Does someone know how to declare a list and use it during the evaluation of documents like presented above ?

King regards.

Edited by: NicePseronMahou on Feb 28, 2012 10:15 AM

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 12 2013
Added on Feb 28 2012
3 comments
2,121 views