'existdb util:get-fragment-between to get fragment from node to end of file
In some prior iteration of the exist-db version, the following code was working to create a fragment between a specific starting node and the end of the file (aka, everything that follows until the end).
Here's the code:
let $beginning-node := $doc/tei:TEI//tei:body//tei:pb[@ed=$initial_with_hash][@n=$surface_number_start]
let $ending-node := $doc/tei:TEI//tei:body//tei:pb[@ed=$initial_with_hash[@n=$surface_number_start]//following
let $make-fragment := true()
let $display-root-namespace := true()
let $fragment := util:get-fragment-between($beginning-node, $ending-node, $make-fragment, $display-root-namespace)
Today I realized that this code, though unchanged, is no longer working. Specifically, there seems to be problem with using the //following to create the $ending-node. So I suspect a change has been made in an updated version and I need to update my code somehow. The question is how.
In this particularly case, there is a specific element I want the fragment to begin from and then I want the fragment to include everything that follows, but in such I case I'm not sure how to properly provide and $ending-node
If anyone has ideas about I could update this so that it will start working again, I would be grateful.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
