Hi Folks,
When I run my XSLT program, I provide it with an input XML document. I call
that input XML document the "primary XML document." I successfully created
keys on elements in the primary XML document.
My XSLT program must also retrieve data from another, non-primary, XML
document. I create a variable to access the non-primary XML document:
<xsl:variable name="cc" select="doc('cc2areaCode.xml')/*" />
I successfully retrieved data from that non-primary XML document using this
code:
<xsl:sequence select="$cc/Row[Country eq $first-2-chars]/areaCode"/>
To speed up my XSLT program, I would like to create a key for the non-primary
XML document:
<xsl:key name="ARPT-to-CC" match="$cc/*/Row" use="Country"/>
And then use the key:
<xsl:copy-of select="key('ARPT-to-CC', $first-2-chars)/areaCode"/>
However, I have found that the xsl:copy-of outputs nothing.
Is it possible to create and use a key for a non-primary XML document?
/Roger
|