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

RE: looping through result tree fragments to aggregate

Subject: RE: looping through result tree fragments to aggregatedata
From: Erika Marlow <EMarlow@xxxxxxxxxxxxxx>
Date: Tue, 27 May 2003 08:50:42 -0500
xsl aggregate
<snip - Wendell said:>
Also, depending on the original problem, sometimes you don't even need the 
original aggregation step, or can perform it in such a way that you can 
aggregate a node set, not an RTF. (One would have to see that for-each loop 
to know in your case. Does its operation merely collect a node set, or does 
it do something more complex?) If you can do this, you can process this 
node set; the problem goes away.
</snip>

What follows is a variable containing a for-each loop that collects the
nodes needed for further processing later in the XSL. As far as I can tell,
it is simply collecting the nodes based on certain criteria. If this can be
translated into a node-set, I would certainly appreciate pointers on how to
modify it.  
Thank you,
Erika

<xsl:variable name="xactmonth">
  <xsl:for-each select="elig/eligtrans/origreq/eliginq[count(. | 
   key('monthskey' , substring(@reqdate,1,6))[1]) = 1]" >
    <reqmonth>
	<xsl:attribute name = "month">
	<xsl:value-of select="substring(@reqdate,5,2)" />
	</xsl:attribute>
	<xsl:attribute name = "year">
	<xsl:value-of select="substring(@reqdate,1,4)" />
	</xsl:attribute>
	<xsl:variable name="curReqMonth" select = "substring(@reqdate,1,6)"
/>
	  <xsl:for-each select="//elig/eligtrans
[substring(origreq/eliginq/@reqdate,1,6)=$curReqMonth]">
	    <xaction>
		<xsl:attribute name="site">
		<xsl:value-of select="origreq/eliginq/gedisid" />
		</xsl:attribute>
		<xsl:attribute name="payer">
		<xsl:value-of select="origreq/eliginq/gedipid" />
		</xsl:attribute>
		<xsl:attribute name="rej">
		  <xsl:choose>
		    <xsl:when test="resp/eligresp/sub/reject">1</xsl:when>
		    <xsl:otherwise>0</xsl:otherwise>
		  </xsl:choose>
		</xsl:attribute>
	    </xaction>		
	  </xsl:for-each>
    </reqmonth>	
  </xsl:for-each>
</xsl:variable>




------------  Gateway EDI, Inc.  ---------------------------------------------------------------------------------------------------

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose or otherwise use it or any part of it in any way.  To do so may be unlawful.  If you receive this email by mistake, please advise the sender immediately and destroy all copies of the original message.


 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.