Created
October 20, 2011 13:33
-
-
Save grtjn/1301151 to your computer and use it in GitHub Desktop.
A small example of XQuery Data Definition Facility..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: A small example of XQuery Data Definition Facility.. :) | |
(: Declare a ‘users’ collection :) | |
declare collection users as element()*; | |
(: Declare an index on top of ‘users’ using @id :) | |
declare automatically maintained index users-by-id | |
on nodes xqddf:collection( xs:QName("users") ) | |
by @id as xs:string; | |
(: Filling and using the index :) | |
xqddf:insert-nodes( | |
xs:QName("users"), <user id="geert"/>); | |
xqddf:probe-index-point( | |
xs:QName("users-by-id"), "geert"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment