David Marston wrote:
> You didn't show us where you
> invoked document(), so we can't judge whether Xalan had encountered
> the @name nodes in the other file.

Sorry!  I deleted one too many lines when simplifying my style sheet
before posting.  I was trying to follow Uche Ogbuji's example code and
thought that just writing this as a top-level element would work to
set up the keys:

<xsl:variable
  name="load_java_reserved_words"
  select="document('java_reserved_words.xml')"/>

> I presume that you read the keying-other-documents stuff at the end of
> Section 12.2 of the XSLT spec. It shows use of keys on other 
> documents,
> but relies on xsl:for-each to switch the current node list. This is
> reinforced by the sneaky phrase in the first paragraph under the key()
> function that says "it returns a node-set containing nodes in the same
> document as the context node...." You might not be invoking key() at a
> place where the current/context node is inside the reserved_words.xml
> file.

I missed all of this, but now that I have added the for-each to my code
it works.

Thanks for the help.

- Stephen

Reply via email to