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

Re: Capturing/testing results of a boolean expression.

Subject: Re: Capturing/testing results of a boolean expression.
From: "Edward L. Knoll" <ed.knoll@xxxxxxxxxxxxxx>
Date: Fri, 02 Aug 2002 15:59:53 -0600
boolean expression tree
Maybe details are called for, because as I gnaw at this problem and read
archives I realize the trick might be to establish an expression which
returns a "boolean" as opposed to an expression which returns a
"results-tree-fragment".

I have a variable which will have a string value.  I wish to compare
that string value to another string value (which happens to be a literal
value).  I've done this directly in a xsl:if or xsl:when before, but now
I'm trying to capture the results of the expression in a variable.

<xsl:variable name="X" ..../>

<xsl:variable name="flag" select="$X = 'literal-string-value'" />

Is there a way to do this that returns a 'boolean' and not a
'results-tree-fragment'?

Is there a way to take a 'results-tree-fragment' which has the value
"true" or "false" and turn it back into the equivalent 'boolean' value?

Thanks again,
Ed Knoll


> I have state information I need/wish to capture in a
> "boolean" variable.   I need to use the result of the expression in
> multiple places; I do not wish to replicate the expression everywhere it
> is needed for maintenance reasons.  The value is "static" and I can
> establish it at a global context.
> 
> I have yet to figure out how to do it.  No matter what I try I get a
> position evalution of the variable.  I can print the variable and see
> that I am getting the correct boolean value (true or false).    How do
> I capture the results of a boolean expression in a variable and how can
> I then test the value of that variable?
> 
> Please don't ask for details; I don't want specific point-source
> alternatives for how to work around the issue  I want to how to capture
> the results of a boolean expression and then use those results later in
> a conditional expression (e.g. xsl:if or xsl:when).
> 
> Thanks,
> Ed Knoll
> 
> --
> Edward L. Knoll   Phone (work)     : (719)484-2717
>                   e-mail (work)    : f49660c@xxxxxxxxxxxxxx
>                   e-mail (business): eknoll@xxxxxxxxxx
>                   e-mail (personal): edward@xxxxxxxxxxx

-- 
Edward L. Knoll   Phone (work)     : (719)484-2717
                  e-mail (work)    : ed.knoll@xxxxxxxxxxxxxx
                  e-mail (business): eknoll@xxxxxxxxxx
                  e-mail (personal): edward@xxxxxxxxxxx

 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.