Subject:xsl:key and key () with input as more than one value - urgent Author:soundari r Date:13 Oct 2005 06:48 AM
Hi,
I am new to use xsl:key functionality. My understanding is u
can reference a key and obtain the corresponding value from an
external xml file. Is that possible to give two or three values
for the query and retrieve one value.
For example:
i want to give empid, and department as input . the output would be
some value matching these two values.
Even in the referenced xml i have the values as
<empid> and <department> and <result> as elements. Its quite urgent.
Any help in this is appreciated.
Subject:xsl:key and key () with input as more than one value - urgent Author:(Deleted User) Date:13 Oct 2005 11:07 AM
It is up to you to assign a value to the "use" attribute of "key" element. This "use" string will be calculated for each node matching
the pattern (specified as a value of "match" attribute) and the node
will be inserted into the map (actually multimap) using calculated "use" as a key. Take a look at this example:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="MultiValueKey" match = "/xml/record" use = "concat(key1,key2)" />