Re: [xsl] creating and using a XML nodelist within an XSL template

Subject: Re: [xsl] creating and using a XML nodelist within an XSL template
From: "Todd Binder" <todd_binder@xxxxxxxxxxx>
Date: Mon, 30 Dec 2002 13:14:56 -0500
the NODE-SET function appears to be the function that will allow for this,
but I am having a problem using it with the MSXML, is it supported by the
MSXML DOM?


----- Original Message -----
From: "Todd Binder" <todd_binder@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, December 30, 2002 12:41 PM
Subject: [xsl] creating and using a XML nodelist within an XSL template


> is it possible to create an XML nodelist for use solely later on in the
XSL
> template?  I don't want to output the XML nodelist, I merely want to have
> the XSL template use it later in its processing.
>
> what I have is a XML file with 2 ids with information that is grouped.
What
> I want to find is the top 2 groups (based on average of the 2 values) and
> then output a nodelist that is comprised of the each id and its values for
> the aforementioned top 2 groups
>
> I was trying to have one FOR-EACH that summed up the group values, but
can't
> seem to figure out how to a) determine what the top 2 groups are, and b)
how
> to use that information later when I am outputting the information?
>
> in the below example, it would have the following INPUT and OUTPUT
>
> INPUT
> <items>
> <item id='a'>
>     <group>1</group>
>     <value>3</value>
> </item>
> <item id='a'>
>     <group>2</group>
>     <value>7</value>
> </item>
> <item id='a'>
>     <group>3</group>
>     <value>2</value>
> </item>
> <item id='a'>
>     <group>4</group>
>     <value>2</value>
> </item>
> <item id='b'>
>     <group>1</group>
>     <value>1</value>
> </item>
> <item id='b'>
>     <group>2</group>
>     <value>9</value>
> </item>
> <item id='b'>
>     <group>3</group>
>     <value>4</value>
> </item>
> <item id='b'>
>     <group>4</group>
>     <value>2</value>
> </item>
> </items>
>
>
> OUTPUT
> <items>
> <item id='a'>
>     <group>2</group>
>     <value>7</value>
> </item>
> <item id='a'>
>     <group>3</group>
>     <value>2</value>
> </item>
> <item id='b'>
>     <group>2</group>
>     <value>9</value>
> </item>
> <item id='b'>
>     <group>3</group>
>     <value>4</value>
> </item>
> </items>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>

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


Current Thread