eXist-db / existdb-saml

XQuery module that implements SAML v2 single sign-on
GNU Lesser General Public License v2.1
4 stars 3 forks source link

Remove deprecated function xmldb:document #1

Closed joewiz closed 3 years ago

joewiz commented 5 years ago

Running @craigberry's https://github.com/craigberry/audit_exist_5x_removals script on this repository returns one hit:

>>>  Replace the following instances of the function xmldb:document with fn:doc.

./content/exsaml.xqm:372                 exists(xmldb:document($exsaml:saml-coll-reqid||"/"||$reqid)) and empty(xmldb:remove($exsaml:saml-coll-reqid, $reqid)))) then

This is needed for compatibility with eXist 5.

See the description of the xmldb:document function: http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/xmldb#document.1. It should be a straightforward fix to replace this with fn:doc.