johnbasil
johnbasil

Reputation: 43

BaseX list specific documents for database

When building a database in BaseX, can I provide a list of documents to be added? (Or a list of documents not to be added?)

I'm working from a directory structure that contains both the documents of interest, as well as older versions that I want to exclude. It would be a big hassle to change the whole directory structure.

Upvotes: 0

Views: 295

Answers (1)

Jens Erat
Jens Erat

Reputation: 38732

Create an empty database, and then subsequently loop over those documents you want to add and run the ADD command for each of them.

Alternatively, you could add them from within XQuery. Query for the files you want to add using the file module, and add them running using db:add(...).

Upvotes: 1

Related Questions