Hi all, can’t figure it out. Is there any way in XQuery Update, to delete a specific attribute from any node? Thanks for help. Best regards Günter
On 27.09.2020 14:48, Günter Dunz-Wolff wrote:
Hi all, can’t figure it out. Is there any way in XQuery Update, to delete a specific attribute from any node?
Doesn't
delete node //@foo
delete all "foo" attributes?
Or
. update delete node descendant-or-self::*/@foo
?
Question to Christian: why does
. update delete node descendant-or-self::*/@class
work for me but
/ update delete node descendant-or-self::*/@class
gives an error unexpect end of query.
Question to Christian: why does
. update delete node descendant-or-self::*/@class
work for me but
/ update delete node descendant-or-self::*/@class
gives an error unexpect end of query.
OK, / update is ambigious, it has to be
(/) update delete node //@class
to make sure the update is not seen as a child node selection of update elements to the root node /.
basex-talk@mailman.uni-konstanz.de