Re: XQuery function

At 02:55 PM 7/6/2001 -0300, Claudio Hessel Peixoto Gomes wrote:
>I declared the function:
>
>define function tInterval($param) returns result
>{
>    for $var1 in document("tvm-4.xml")//TemporalObjects/Object
>    return
>       <result <mailto:oid={$var1/@oid>oid={$var1/@oid}>
>       {
>          for $var2 in concat("$var1//Attributes/",$param,"/Value")
>          return
>             <tInterval 
> <mailto:tTimei={$var2/@tTimei>tTimei={$var2/@tTimei} 
> <mailto:tTimef={$var2/@tTimef}/>tTimef={$var2/@tTimef}/>
>       }
>       </result>
>}
>
>And call:
>tInterval(CONCAT_ELEMENT)
>
>I want concat a child in expression, like this: 
>"//Attributes/CONCAT_ELEMENT/Value"
>A function CONCAT can used for this?

The function library for XQuery has not yet been fixed. Since concat() is 
supported by XPath, it seems quite plausible that this will be one of the 
functions in the library when the library is established. For now, each 
implementation may have a different set of functions.

Jonathan

Received on Monday, 9 July 2001 10:18:09 UTC