| Subject: Re: Using a variable to check to see if that element exists in  another xml doc. From: "John E. Simpson" <simpson@xxxxxxxxxxx> Date: Mon, 07 Feb 2000 18:16:13 -0500 | 
I am trying to use the variable myKey to check to see if it's value (ie. "currencyCode") is an element in another document. I am having some problems. does anyone know what is wrong with this xsl.
<xsl:template match="object">
     <xsl:for-each select="property">
          <xsl:variable name="myKey" select="key"/>
          <xsl:if test="$myKey='currencyCode'">
               This works; try the next if
               <xsl:if test="document('en_US.xml')/locale/*[name()=$myKey]">
                    insert label
               </xsl:if>
          </xsl:if></xsl:for-each> </xsl:template>
==================================================================== John E. Simpson | My girlfriend asked me, "Did you sleep simpson@xxxxxxxxxxx | good?" I said, "No, I made a few http://www.flixml.org | mistakes." (Stephen Wright)
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: Using a variable to check to se, Wendell Piez | Thread | Using a variable as an Xpath expres, Jarno Elovirta | 
| Using a variable to check to see if, menkell | Date | Re: Using a variable to check to se, menkell | 
| Month |