Hi Charles,
Is there a way in XQuery I can identify a record in this database not only by its PubMed ID but also limit the result set by source document name?
If the source document name equals the document path in the database, you can supply it as second argument to db:open [1]:
db:open($db, $path)
You could combine this query with an id check:
db:open($db, $path)//...[pmid = $pmid]
I have 26 such databases, each of which contains 43-44 source files, each of which contains 30000 records. I have built one index database that, for each record, includes PubMed ID, source filename, and database name. For a given PMID I can very quickly retrieve the db name and the file name, but I need to search the db not only by PMID but also by source filename in order to select the most recent version of a record.
If all document versions occur in the same database, and if the number of versions is limited, a query could look as follows:
let $path := '...' let $pmid := '...' let $db := (: ...retrieved from index database :) let db:open($db, $path)
Hope this helps, Christian