RE: [xsl] Keys off of variable xml source

Subject: RE: [xsl] Keys off of variable xml source
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 1 Apr 2005 09:12:49 +0100
> Is it legal to create a key off of an xml source stored as a variable?

No.

> So the key decleration might look like:
> 
> <xsl:key name="myKey" match="$external_xml_source//data" 
> use="some_element"/>
> 
> If not, is there a workaround?
> 

Yes, just use match="data", and ensure that the context node is
$external_xml_source at the time you call the key() function.

Michael Kay
http://www.saxonica.com/

Current Thread