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

Re: How to create a temporary xml tree and then re-use

Subject: Re: How to create a temporary xml tree and then re-use it
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Tue, 22 Jan 2002 22:03:59 +0100
temporary xml
You can do it like the following:

<xsl:variable name="$qty">

The problem is that you don't have a nodeset now, only a Result Tree
Fragment. And on the RTF you can't work like on a nodeset. You need a
nodeset()-function, but it is processor-specific. An example for Xalan:

<xsl:stylesheet version="1.0"

<xsl:variable name="$qty">
    <xsl:for-each select="/root-element/load-qty">
        <xsl:element name="qty">
            <xsl:value-of select="."/>

<xsl:template match="/">
    <xsl:value-of select="sum(xalan:nodeset($qty)/qty)"/>


The XML:




----- Original Message -----
From: "Khalid" <k_ali@xxxxxxxxxxxxxxx>
To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, January 22, 2002 9:34 PM
Subject:  How to create a temporary xml tree nd then re use it

> Hello,
> Can I create a temporary xml tree in memory and then re-use it.
> Like
> <load-qty>12</load-qty>
> <load-qty>2</load-qty>
> <load-qty>53</load-qty>
> Say I read the document and create a new element in memory called
> for each element from xml file
> and then run sum(qty)? on this newly created tree
> Thanks in advance

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

Current Thread


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.
First Name
Last Name
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.