I don't know if it is the optimal solution in BaseX, but what functionality concerns, you can look at this functx function: http://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.html
For BaseX specifics, maybe this page can help you (sorry but I am not sure): http://docs.basex.org/wiki/Index
Best, Kristian K17. nov 2017 4:06 PM kirjutas kuupƤeval Giuseppe Celano celano@informatik.uni-leipzig.de:
Hi All,
I would like to ask what the best way is in BaseX to create XPath expressions once I identify a certain span in an XML file. More concretely, I usually tokenize a text contained in an XML document, and I would like to specify for each token its position in the original document. Thanks.
Best, Giuseppe