Reputation: 402
Text Encoding Initiative reccomends using various pointer schemes. Are there already any XSLT (<= 2.0) implementations which can deal with resolving them? For instance, resolving of @corresp="#range(#id1, #id5)"
Upvotes: 1
Views: 94
Reputation: 1046
There isn't anything more than a bare-bones implementation I wrote years ago, around the time of the Balisage paper. The problem is that anything beyond basic id resolution doesn't play very well in XSLT. You could do it in EXSLT, or using the paid tier of Saxon, but developing a straightforwardly distributable version seemed impossible at the time, so I only ever did it in JavaScript (for browser-based visualizations—see https://github.com/hcayless/tei-xpointer.js—rather out of date now). You can do XPath eval in more modern XSLT, but I haven't revisited it lately. I probably should. The TEI Guidelines try to be pretty specific about what gets returned in cases of overlap. Basically text and any elements entirely contained within a range—no partial elements or anything like that.
Upvotes: 1
Reputation: 619
TEI pointers actually predate XPath, and were one of the inspirations. SoftQuad Panorama supported them.
You have to decide what you want the implementation to do if it's asked for a range, as its not just a case of returning all elements between. For example, you can have a range from the middle of one paragraph to the middle of the next. https://journals.openedition.org/jtei/907 has an example.
Hugh Cayless has been active in this area, and https://www.balisage.net/Proceedings/vol5/html/Cayless01/BalisageVol5-Cayless01.html may be a good starting-point.
Upvotes: 0