[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] key() and document() - scoping problem?
I have defined a key, then use its value in the following xsl (xslt v.1): <span class="x"> <xsl:value-of select="count(key('key2_1', 'general'))" /> </span> <xsl:for-each select="document(string($options))/options/option"> <span class="y"> <xsl:value-of select="count(key('key2_1', 'general'))" /> </span> </xsl:for-each> Results in this: <span class="x">4</span> <span class="y">0</span> I would expect to get a '4' in both cases. The document referred to is referenced correctly and I would be using it to specify the key value required. The document seems to throw the key out of scope, but I dont see how to correct that. thanks, Bryn -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.15.24/592 - Release Date: 18/12/2006 1:45 PM The contents of this email and any attachments are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient of this email please notify the sender immediately, delete the email and any attachments from your system and do not print, distribute, store, commercialise or act on any information it contains.
|
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
|