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

creating and using a XML nodelist within an XSL templa

Subject: creating and using a XML nodelist within an XSL template
From: "Todd Binder" <todd_binder@xxxxxxxxxxx>
Date: Mon, 30 Dec 2002 12:41:31 -0500
xml nodelist
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


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-2013 All Rights Reserved.