Implement XQuery that provides where-used information for a given element
Input to the query:
Topic (for topics and elements within topics) or map (for maps or elements within maps)
Element ID
Optional parameter indicating the types of uses to report:
* All (default)
* Topicrefs (for topics and maps)
* XRefs
* Conrefs
* Key definitions (for topics and maps)
* Key references from maps
Result:
A set of "resource descriptors", where a resource descriptor provides the following information:
An "object ID", which is a hash of the git repository, commit and tree position of the element within its containing document. This value will be unique for every version in time of every element in every document across all the git repositories managed in the BaseX server. It will be the same for two different branches of the same git repository where both branches reflect the same commit.
The BaseX database that contains the result
The git repo, branch, and commit for the resource
The URL of the containing document relative to the root of the database (which should be identical to the path within the corresponding git repository
An XPath expression that locates the result element within its containing document.
The tagname and attributes of the result document
The first 80 characters of the element's content, if any
Implement XQuery that provides where-used information for a given element
Input to the query:
Result:
A set of "resource descriptors", where a resource descriptor provides the following information: