I suspect it's complaining because you haven't provided it with a base URI for the stylesheet, which means that it has no way to interpret the relative URI reference in document('second.xml')
______________________________________ Joe Kesselman / IBM Research