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

RE: Profiling Number Ranges

Subject: RE: Profiling Number Ranges
From: Naomi Gronson <naomi_gronson@xxxxxxxxx>
Date: Tue, 23 Nov 2004 09:10:13 -0800 (PST)
xsl if number
That tokenize function works great and I really like
what I see when browsing the Xpath functions.  I
upgraded to the latest saxon to get some of the 2.0
support and was able to get the code to this point.

I tokenize and loop through the SystemLevel attributes
(5.1;5.4;6.0) of elements that have it defined, then I
do a comparison to find if a given element meets the
greater than criteria.  It seems like I'm stuck at a
place where a variable would need to be set or
something because I can't figure out how to display
pass through the current node (context item/atomic
value), and how to do that only once (not for every
compare that meets the criteria).

$SystemLevel=5.1+

<xsl:when test="contains($SystemLevel, '+') and
@SystemLevel">
	<xsl:for-each select="tokenize(@SystemLevel, ';')">
		<xsl:if test="number(.) &gt;=
number(translate($SystemLevel, '+', ''))"> 	
			<!-- if this loop entered I want to keep the
element -->
     		</xsl:if>
      </xsl:for-each>
   </xsl:when> 

Then after looking at some of the other Xpath 2.0
functions, I thought maybe using the Max and Min
functions on my SystemLevel attributes to then do a
compare against the largest number of the group, but I
can't seem to figure out how to get my @SystemLevel
(5.1;5.4;6.0) in to a the proper format for
fn:max()...something like this:

<xsl:if test="number(max((translate(@SystemLevel, ';',
',')))) &gt;= number(translate($SystemLevel, '+',
''))"> 	
	<!-- if this loop entered I want to keep the element
-->
</xsl:if>

I appreciate all the help.

Naomi




		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 

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.