Skip to content

Commit

Permalink
update canned-queries: start adding some contextual comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CanOfBees committed May 10, 2017
1 parent db25a2b commit 55df8ed
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion canned-queries.xq
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
(: some helpful queries :)
(: some helpful queries --
: these can be run in the BaseX GUI, by copying the query up to the delimiting ',' (comma -- but *not* the comma!)
: into a new file and then running the file.
:
: assumptions:
: 1) you have similarly named databases!
: 2) you're using BaseX
:)

(:
: the following query returns the OAI-PMH identifier for each record with an attribute='deleted', appearing anywhere in
: the record.
:)
for $name in db:open('repox-sets')/set/spec/text() return db:open($name)/*:record[//@*='deleted']/*:header/*:identifier/text(),


for $name in db:open('repox-sets')/set/spec/text() return db:open($name)/*:record[*:header/*:identifier[fn:contains(.,'p265301coll005/7')]],

for $name in db:open('repox-sets')/set/spec/text() return db:open($name)/*:record[*:header/*:identifier[fn:contains(.,'p18877coll16/24')]],
Expand Down

0 comments on commit 55df8ed

Please sign in to comment.