I’m using Saxon as my XSLT 2.0 processor in a project. The stylesheet relies on generate-id(), and my unit testing currently relies on string comparison of the output to expected output. Occasionally, generate-id()s values change on me and I get annoyed.
After a little investigation, I believe that the first little bit of the ID comes from some internal index of XML documents that Saxon is keeping track of. Things like <xsl:include/> and document() calls can change these indexes. So there ya go.