[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: keys and variables VIII

Subject: Re: keys and variables VIII
From: Steve <subsume@xxxxxxxxx>
Date: Wed, 2 Aug 2006 16:51:47 -0400
Re:  keys and variables VIII
Dual key solution was neccesary after all because this was pulling
only the count of the first instance of $type, not all option/@oldIDs
with a type of @type.

add key ...

<xsl:key name="types" match="option" use="@type" />

...and then...

<table border="1">
	<xsl:for-each select="$Definitions/disabilities/option[generate-id(.)=generate-id(key('options',@type)[1])]">
		<xsl:sort select="@type"/>
		<tr>
			<td>
				<xsl:value-of select="@type" />
			</td>
			<td>
				<xsl:variable name="current" select="key('types',@type)" />
				<xsl:for-each select="$vP2disab">
					<xsl:value-of select="count(key('records',$current/@oldID))" />
				</xsl:for-each>
			</td>
		</tr>
	</xsl:for-each>
</table>

On 8/2/06, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
At 2006-08-02 13:41 -0400, Steve wrote:
>Having some difficulty with output. Perhaps someone can shed some
>light as to why.

It appears you were searching the wrong file and key table for the records.

Current Thread

Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.