> I talked to Markos and there are some more issues here.
> 1. The function should probably go into the static context instead of the
> dynamic context.
But the Static context doesn't have functions to access the external variables, 
so if this function is to be implemented in the static context it would 
actually be using several functions of the dynamic context to work. Since the 
external variable are part of the Dynamic context isn't it better to just leave 
them there?

> 2. It really depends on what you want to cast to. In general, the target type
> for casting is a sequence type (e.g. node()*, or xs:string?). As already
> mentioned, this cannot be returned as an item other than a string. If you did
> that, it pushes a lot of effort to the consumer because he needs to parse the
> sequence-type. There are two alternatives:
>   - xqxq:variable-type-name($name as xs:QName) as xs:QName? which returns the
> name of type (e.g. no node()*)
>   - xqxq:variable-sequence-type($name as xs:QName) as xs:string? which returns
> the sequence type as a string.
> It really depends on exactly what the user needs. I would go with variable-
> type-name if that's sufficient for all FOTS use cases.
I will go ahead and make the change for it to return of a QName 
Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to