24. update-key

update-key(key_name, key_value, keyed_node?)

Add node or attribute keyed_node to the entry having value key_value of map key_name. Map key_name is created if needed to. Entry key_value is created if needed to.

Parameter key_name is a string representing an XML qualified name. Parameter key_value is a string. Parameter keyed_node defaults to the context node.

See also XSLT function key() and command delete-key().


update-key("anchors", @name);

update-key("refs", substring-after(@href, "#"), .);

update-key("ids", @name, $ancestorP);