Skip to content

Commit

Permalink
fix: account for fn:root bugfix in eXist 6.1.0
Browse files Browse the repository at this point in the history
Before eXist 6.1.0, eXist’s implementation of the fn:root() function contained a bug that caused it to always return a document node, even when called on an in-memory node whose root node was an element node. This bug was fixed in eXist-db/exist#4402.

The only code in hsg-shell that assumed the buggy behavior was the code that handled the display of concurrent appointments in POCOM data.

After upgrading HSG from 5.1.1 to 6.2.0, this code triggered an error.
  • Loading branch information
joewiz committed Apr 25, 2024
1 parent 66409fd commit 10f5b65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/pocom-html.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ declare function pocom:format-roles($person) {
let $sorted-roles :=
for $role in $item/*
(: delicately construct a new root node containing all of the info needed to reconstruct position description with dept:format-role() :)
let $role-node := element {$role/name()} {$role/*}
let $role-node := document { element {$role/name()} {$role/*} }
return
pocom:format-role($person, $role-node/*[2])
pocom:format-role($person, $role-node/*/*[2])
return
<li>
<em>Concurrent Appointments</em>
Expand Down

0 comments on commit 10f5b65

Please sign in to comment.