... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)



The key() function is sensitive to the current context node in that it will only find nodes that are in the current document.  This is surprising behaviour.  The XSLT specification actually notes this "feature" (read: bug) at the end of section 12.2.  It suggests using <xsl:for-each select="$document"> construct to switch the context prior to using the key function.  That wouldn't work for me in a stylesheet that I was working on because I needed an XPath expression.  This worked:  $root[key('...', ...)]

Blog Archive