[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
On 25/04/2011 10:38, Costello, Roger L. wrote:
Apart from the use of "If" rather than "if", this is a valid XPath expression.
Please supply a complete working example that demonstrates the problem.
Re: [xsl] XPath expression that generates false plus a message?
Subject: Re: [xsl] XPath expression that generates false plus a message? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Wed, 25 May 2011 09:28:53 +0100 |
On 25/04/2011 10:38, Costello, Roger L. wrote:
Hi Folks,
I want an XPath expression that is an if-then-else:
If (condition) then true() else false()
Apart from the use of "If" rather than "if", this is a valid XPath expression.
If "condition" is satisfied then return true, else return false. However, in addition to returning false, I want to return a message.Your guess is wrong. The else part will always return false.
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.
Please supply a complete working example that demonstrates the problem.
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: evaluate rendered text le, Giuseppe Briotti | Thread | [xsl] need xsl template for this xm, Frank Brooks |
[xsl] Re: evaluate rendered text le, Giuseppe Briotti | Date | Re: [xsl] Saxon error: "If none of , Wendell Piez |
Month |
Keywords