Hi David, How about using computed namespace constructors (XQuery 3.0)? Something like: <transform> { for $n in $my_namespaces return namespace { $n/@prefix } { $n/@uri } } </transform> Kind regards, Ghislain