Dear BaseX people,
what would be an efficient way of checking if a given node is a database node?
According to the documentation, function db:name() throws an error if the node is not a database node. However, that is not what I observe.(The same applies to db:node-id(), db:node-pre(), db:path()). Therefore I resorted to this way of checking:
try {db:name($node) ! db:exists(.)} catch * {false()}
That is clumsy and unreliable: if applied to a node in a file, db:name() returns the base name of the file, which might accidentally be a database name.
What would you recommend instead?
Kind regards, Hans-Jürgen
Good evening/morning Hans-Jürgen,
Thanks for the observation, I have uploaded a new snapshot. BaseX 10.3 will be released next week.
Cheers, Christian
basex-talk@mailman.uni-konstanz.de