xsl-list
[Top] [All Lists]

Profiling Number Ranges

2004-11-18 07:58:44
I have a profiling filter that removes certain
elements prior to publish.  I've been enabling the
content owners to apply multiple attribute values to
content within Epic Editor.  For most information this
is relatively straightforward, the problem comes in
with SystemLevel:

<para SystemLevel="5.1;5.2;6.0">Now reboot.</para>
<para SystemLevel="5.0;5.5;9.2">Log out and go eat a
snack.</para>

I've allowed users to make selections in the filter
such as "5.1" (using contains()) but the trouble is
when I try to implement the range feature to give the
user a greater than/less than like "5.1+"

$SystemLevel = "5.1+"

<!--  This code worked when only one SystemLevel
attribute value was allowed -->
<xsl:when test="contains($SystemLevel, '+') and
@SystemLevel and (not(@SystemLevel &gt;=
translate($SystemLevel, '+', '')))">
        <xsl:message>Process: Suppressing <xsl:value-of
select="name()"/> with SystemLevel =  <xsl:value-of
select="@SystemLevel"/> and Profile of <xsl:value-of 
select="$SystemLevel"/>.</xsl:message> 
      <xsl:apply-templates mode="suppress"/>
</xsl:when> 

You can probably see the the dilemma now.  Does anyone
know an approach that could be used to somehow take a
list of a few attribute values ("5.1;5.2;6.0") and use
the &gt;= greater than symbol to suppress content in
which none of the values match the greater than
criteria?  Would the values need to be parsed in order
to do this, etc.?  Thanks for the help.

Naomi


                
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>