There's no built-in capability for multi-part keys in XSLT but you can do-it-yourself using string concatenation. Just make sure you use the same expression in the "use" attribute of xsl:key and in the second argument of the key function:
use = "concat(stream, '#', codeType, '#', sourceValue)"
key('k', concat(stream, '#', codeType, '#', sourceValue))
In 2.0 you can use a user-defined function to hide the sordid detail:
use="f:compound-key(stream, codeType, sourceValue)"
key('k', f:compound-key(stream, codeType, sourceValue))
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference