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

XPath expression that generates false plus a message?

Subject: XPath expression that generates false plus a message?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Mon, 25 Apr 2011 05:38:37 -0400
 XPath expression that generates false plus a message?
Hi Folks,

I want an XPath expression that is an if-then-else:

     If (condition) then
         true()
    else
        false()

If "condition" is satisfied then return true, else return false. However, in
addition to returning false, I want to return a message.

Here's an example that illustrates what I want to do:

----------------------------------------------------------------------
if (xs:time(start) gt xs:time(end)) then
     true()
else
     trace(false(), 'Hey, the meeting ends before it begins!')
----------------------------------------------------------------------

Unfortunately, that doesn't work. I guess the "else" part is actually
returning true.

If there any way to return a false, but have a string come along with it?

/Roger

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.