|
Subject: RE: [xsl] Profiling Number Ranges From: Naomi Gronson <naomi_gronson@xxxxxxxxx> Date: Tue, 23 Nov 2004 09:10:13 -0800 (PST) |
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(.) >=
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, ';',
',')))) >= 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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Profiling Number Ranges, Michael Kay | Thread | Re: [xsl] Profiling Number Ranges, David Carlisle |
| [xsl] root node template - unmatchi, Chizzolini Stefano | Date | Re: [xsl] root node template - unma, David Carlisle |
| Month |