|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Using a variable to check to see if that element exists
At 03:52 PM 02/07/2000 -0600, menkell@xxxxxxxxxx wrote:
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. Try this: <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> Works okay under XT; dunno about Xalan. ==================================================================== 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) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








