If generate-id() is used and returns duplicates for nodes from different documents then it is bug in XSLT processor, in this case xsltproc. Please try with Saxon. If it works in Saxon, then please report this bug against xsltproc.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.