Hi Bas, > Thank you very much for explaining the "key issue" of xsl keys to > me. You were right, I had to compare the value of elementName (in > the source document) with elementName/@refAttr (in the other > document); not the source attribute refAttr. > > It miraculously works now. I had some trouble understanding the > mechanism behind the "use" attribute. Basically, the XSLT processor creates a look-up table for the document. The processor goes through all the nodes in the document and tests them to see if they match the pattern in the 'match' attribute of xsl:key. If a node matches the pattern, then the processor creates an entry in the look-up table. The matching nodes are each assigned a key value, which you can then use to look up the nodes that have that key value. The key value is calculated by evaluating the expression in the 'use' attribute with the matching node as the current node. So the expression in the 'use' attribute usually takes you from the node that you're matching to the value you can use to look up the node. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format