[xquery-talk] function definitions

Mark R Maxey Mark_R_Maxey at raytheon.com
Fri Aug 1 09:11:40 PDT 2003


If you're talking about BEA LD 1.1, I asked the same question and was 
told "LD 1.1 does not support User Defined Functions. This feature was 
omitted for performance reasons."

BEA 8.1 which just came out yesterday only supports

XQuery

|http://www.w3.org/TR/2001/WD-xquery-20011220|

XQuery Functions and Operators

|http://www.w3.org/TR/2002/WD-xquery-operators-20020430|



In looking at the LD 8.1 release notes and other docs, I don't see where 
they've added support for them yet.

Jason Hunter wrote:

> Are you sure the BEA implementation supports the May draft?  The "as" 
> syntax like you're using is from May.  You can see if the 
> round-half-to-even() or trace() functions are implemented.  Those 
> being implemented would indicate it's May.
>
> -jh-
>
> Dmitri.Colebatch at toyota.com.au wrote:
>
>> hey all,
>>
>> another question.... hopefully not quite as trivial as the last.
>>
>> I'm trying to define my own function, and have the following in my 
>> header,
>> however I am getting parse exceptions from the bea weblogic 
>> implementation.
>> Can someone tell me if this is a problem with my code or their
>> implementation...
>>
>> define function convertSAPDateTime($dateNode as node(), $timeNode as
>> node())
>>       as xs:dateTime
>> {
>>       let $dateStr := data($dateNode)
>>       let $yyyy := xf:substring($dateStr, 1, 4)
>>       let $mm := xf:substring($dateStr, 5, 2)
>>       let $dd := xf:substring($dateStr,7, 2)
>>
>>       let $timeStr := data($timeNode)
>>       let $HH := xf:substring($timeStr, 1, 2)
>>       let $mi := xf:substring($timeStr, 3, 2)
>>       let $ss := xf:substring($timeStr, 5, 2)
>>
>>       return xf:dateTime(xf:concat($yyyy, '-', $mm, '-', $dd, 'T', $HH,
>> ':', $mi, ':', $ss))
>> }
>>
>> the code inside the braces works fine when not defined as part of a
>> function, but I am getting parse exceptions on the "as" in "$dateNode as
>> node()".  If I remove the "as node()" then it works fine, however I then
>> have the wrong type for the data function... I assume could cast it, 
>> but as
>> I understand it the above should work...
>>
>> fwiw I'm using http://www.w3.org/TR/xquery/#FunctionDefns as my 
>> reference.
>>
>> thanks again for your help.
>>
>> cheers
>> dim
>>
>>
>>
>>
>>
>>
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>                                DISCLAIMER
>> * This email and any attachment may contain confidential information.
>>   If you are not the intended recipient you are not authorised to copy
>>   or disclose all or any part of it without the prior written consent
>>   of Toyota.
>> * Opinions expressed in this email and any attachment are those of the
>>   sender and not necessarily the opinions of Toyota.
>> * Please scan this email and any attachment for viruses.  Toyota does
>>   not accept any responsibility for problems caused by viruses, whether
>>   it is Toyota's fault or not.
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>>
>> _______________________________________________
>> talk at x-query.com
>> http://www.x-query.com/mailman/listinfo/talk
>>
>
> _______________________________________________
> talk at x-query.com
> http://www.x-query.com/mailman/listinfo/talk
>

-- 
Mark Maxey
(972)205-5760
Mark_R_Maxey at Raytheon.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20030801/5b82a17c/attachment.htm


More information about the talk mailing list