Might not be difficult, but i cannot find the correct command and syntax:
I have a BaseX database opened that holds several XML documents:
/document-uri()
looks like this
/dirA/dirA1/x01.xml
/dirA/dirA1/x02.xml
/dirA/dirA2/x03.xml
/dirA/dirA3/dirA31/x04.xml
/dirA/dirA3/dirA31/x05.xml
/dirA/dirA3/dirA32/x06.xml
/dirB/dirB1/x07.xml
/dirB/dirB2/x08.xml
/dirC/dirC1/x09.xml
/dirC/dirC2/dirC11/x10.xml
/dirD/dirD1/dirD11/x11.xml
/dirE/dirE1/dirE11/x12.xml
What i am looking for is a XQuery to select a document by URI and use it as XPath context, s.th. like this:
document("/dirA/dirA1/x01.xml")/root/foo
Another one would be super useful as well: select all documents in a dir path (recursively:))
document("/dirA/dirA1/")/root/foo