xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Can keys go out of scope?


Subject: [xsl] Can keys go out of scope?
From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx
Date: Fri, 1 Mar 2002 18:19:07 -0000

I know keys can't go out of scope, I just want to know why I'm having to do
this:

 <xsl:template match="Billcode">
   <xsl:variable name="current" select="."/>
   <xsl:apply-templates 
     select="$template/sc:static/*" mode="static">
     <xsl:with-param name="current" select="$current"/>
     <xsl:with-param name="score" select="key('scores',@ScoreRef)"/>     #I
shouldn't need to do this
    </xsl:apply-templates>
 </xsl:template>


The key only gets used at the other end of some chained templates, and I
would have hoped to be able to do this:
<xsl:value-of select="key('scores',$current/@ScoreRef)"/>,

given that I'm passing the Billcode element down the chain in the $current
parameter. I've been through this n times, it even works on a different
stylesheet. I've tested the value of $current/@ScoreRef at every step of the
way, and it's what it was in the first template shown above. Any idea what's
going on (or, (@~!#  as Captain Haddock would say)?

Thanks for your help
Tom




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



Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor