[xsl] Lookup in a xml file with a key

Subject: [xsl] Lookup in a xml file with a key
From: Gaston Annebicque <gaston_annebicque@xxxxxxxxx>
Date: Tue, 10 Jul 2001 02:44:57 -0700 (PDT)

Here is my problem :
I have this xml file :

and with this other xml file that describe a table, I named the file
"lookup.xml" :
<?xml version="1.0"?>

I would like to output the following :

I can't manage to get my xslt to work, here is the current version of it :
<xsl:stylesheet version="1.0"
  <xsl:output indent="yes" omit-xml-declaration="yes"/>
  <xsl:key name="kLookup" match="abbr" use="name"/>

  <xsl:template match="/">
      <xsl:apply-templates select="in/country"/>

<xsl:template match="in/country">
    <xsl:variable name="input" select="."/>
     <xsl:for-each select="document('c:/gaston/lookup.xml')">
        <xsl:for-each select="key('kLookup',name($input))">
            <xsl:value-of select="."/>

If someone could help me with that, I'm totaly lost !!

Thanks, Gaston.

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread