Subject: RE: [xsl] key() and document() - scoping problem? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 19 Dec 2006 18:43:57 -0500 |
ok, I now understand the problem, but not the solution. What I actually want is this:
<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', .))" /> </span> </xsl:for-each>
to produce this: <span class="x">4</span> <span class="y">4</span>
and not: <span class="x">4</span> <span class="y">0</span>
That is, each of the options/option values is an index into the key. I don't want to have to specify what each of them is.
<span class="x"> <xsl:value-of select="count(key('key2_1', 'general'))" /> </span> <xsl:variable name="option-keys" select="document(string($options))/options/option"> <span class="y"> <xsl:value-of select="count(key('key2_1', $option-keys))" /> </span>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] key() and document() - sc, Bryn Lewis | Thread | RE: [xsl] key() and document() - sc, Michael Kay |
RE: [xsl] Using XSLT 1.0 , I have t, Wendell Piez | Date | RE: [xsl] Using XSLT 1.0 , I have t, Brian Martinez |
Month |