From: Costello, Roger L. [mailto:email@example.com]
Sent: 11 March 2010 12:46
Subject: [saxon] Rename all the elements/attributes in all the XML files in a folder -- nothing happens
I am trying to rename all the elements and attributes in all the XML files in a folder. It seems like this should work:
for $i in collection('files?select=*.xml;recurse=yes;on-error=ignore')//(*|@*)
return rename node $i as lower-case(name($i))
But I get no output and no change to the files.
I seem to be accessing all the files correctly because I get the expected output when I simply select all the elements in all the files:
for $i in collection('files?select=*.xml;recurse=yes;on-error=ignore')//*
I am using the latest version of SAXON. Am I doing something wrong or is this a bug?