> > 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?
As I said, it doesn't belong there. If you want to have it in the dynamic 
context
you should only invoke it after execution. 
I think you should use VarInfo* lookup_var(const store::Item* qname) const;
VarInfo contains the type of the variable.

> 
> > 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
Double check with Sorin whether he really doesn't need the occurrence indicator 
for casting.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1064978/+merge/150696
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