Xpath Date Functions

nzblue_fish
nzblue_fish's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 09/30/2009
Points: 1165

Hi mashers,

Quick question. I want to be able to use the XPath 2.0 date functions in my mashups.

When I try to call, for example, fn:current-Date() I get an error.

So, if I try something like the following:

        <assign outputvariable="$currentDate" fromexpr="current-Date()" />

I get the following run time error:

Error in evaluating expression : XPath syntax error at char 14 in {current-Date()}:
    Unknown system function current-Date() : EMML Line # 28 : EMML Line # : 13>

Cheers,

Innes

 

 

0
Your rating: None
smithac
smithac's picture
User offline. Last seen 1 year 14 weeks ago. Offline
Joined: 10/28/2009
Points: 2

 Hi Innes,

    Xpath functions are case sensitive.  Can you change the xpath function from current-Date() to current-date()

    It worked for me, after this change.

    Please do let me know if it works.

 Smitha.

 

nzblue_fish
nzblue_fish's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 09/30/2009
Points: 1165

Hi Smitha,

so many traps for young players ... :) ... and thanks, that worked perfectly.

Cheers, Innes (NZ)