Hi Liam,
That would certainly be possible. The major challenge will be to make it effiicent. Most of the XQFT arguments have been designed to be static, and if we allow something like…
$text contains text { $term } using thesaurus $node
…the value of $node might change with every iteration. That’s definitely something that can be solved as well, it’s just more effort than simply extending the parser: The supplied source should only be reevaluated if the source has really changed; otherwise, performance will suffer.
I’ve already come across similar patterns at other places, such as in predicates that contain absolute paths (and that shouldn’t be fully evaluated either every time they are processed):
//a[ . = //b ]
I’ll have some more thoughts. Christian
On Thu, May 27, 2021 at 5:34 AM Liam R. E. Quin liam@fromoldbooks.org wrote:
What would be involved in extending BaseX's full text to allow a thesaurus to be supplied as a node instead of a URI?
I want to construct one on the fly, and using file:write() seems excessive.
Liam
-- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org