If 'Have Cold' then 'Doctor' else 'Misery'

Last week, at least I think it was last week, it feels like I have been writing in a 'cold' 'miserable' fog lately. I finally visited the doctor today, 'walking pneumonia' was the prognosis - it explains a lot. I have been feeling completely worn out these last weeks with a cough and what can only be described as a 'snotty' nose ... apologies for the conjured image.
Anyhoo, Im now drugged to the eyeballs in the great American tradition. Im not allowed to be my 'reserved English self' here, just 'getting on with it' - when I used to walk into a doctor's surgery in the UK and was asked 'so how are you?' I always found myself saying 'yeah, Im good' - 'then why are you here to see me' was the doctors quippy retort. Very drole! I have been converted, when I go in now, which is still pretty rarely - I ensure a good throaty cough is my answer to any question ... nice.


Moving on, or back to last weeks entry on Watermarking II. Buried away in that post was mention of a little known feature that I thought was worth its own entry. Those of you that know Excel will know that it has an 'inline' if statement, it's very useful - well its come to BIP. It's a simple command that takes the format:


xdoxslt:ifelse(boolean expression ,true result, false result)


in use we get something like


xdoxslt:ifelse(.//WM_FLAG='C?,'Canceled','Approved')


So we can return strings, numbers or even element values from the if statement. You can even nest 'if' statements within the command e.g.


xdoxslt:ifelse(.//WM_FLAG='C?,'Canceled',xdoxslt:ifelse(.//WM_FLAG='A?,'Approved','Pending'))


I have not seen how deep I could nest but it ought to be as deep as you wish. Hopefully it should prove useful to you, its available from release 5.6.3. onwards.

Comments:

Sorry to hear about your cold. All I can say is While(1){ printf("Get well soon. We need more posts! ") }

Posted by Vivek on December 19, 2007 at 05:32 AM MST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today