You didn't say what error you got from the suggestion posted here http://lists.xml.org/archives/xml-dev/200701/msg00120.html which produced the desired result in saxon. (If the problem was getting doc(..) to find the two files, then that's likely to be the same with any suggested code) David