Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-11-01 Thread Markos Zaharioudakis
> The implementation of getExternalVariables in the xqueryimpl level is done.

Juan, I fixed the implementation of the XQuery::getExternalVariables() method. 
The main problem there was that you were comparing QName items using their 
string value. This is not correct because the string value of a QName does not 
contain its naespece URI, so it is possible for 2 QNames to have the same 
string value, even though the QNames are not the same. Please take a look at 
the changes.

 
-- 
https://code.launchpad.net/~zorba-coders/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-11-01 Thread Markos Zaharioudakis
> Done just changed the ownership to zorba-coders
> 
> > Juan, can you please make zorba-coders be the owner of this branch. I want
> to
> > make some changes to it, but I cannot because it currently belongs to you
> > only.

Hmm, I couldn't find it. what is the new name of the branch?
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-11-01 Thread Juan Zacarias
Done, just changed the ownership to zorba-coders

2011/11/1 Markos Zaharioudakis 

> Juan, can you please make zorba-coders be the owner of this branch. I want
> to make some changes to it, but I cannot because it currently belongs to
> you only.
> --
> https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
> You are the owner of lp:~juan457/zorba/xqxq-api-changes.
>



-- 
-JuanZa

https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-11-01 Thread Juan Zacarias
Done just changed the ownership to zorba-coders

> Juan, can you please make zorba-coders be the owner of this branch. I want to
> make some changes to it, but I cannot because it currently belongs to you
> only.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-11-01 Thread Markos Zaharioudakis
Juan, can you please make zorba-coders be the owner of this branch. I want to 
make some changes to it, but I cannot because it currently belongs to you only.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-26 Thread Juan Zacarias
The implementation of getExternalVariables in the xqueryimpl level is done.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-24 Thread Juan Zacarias
Hi markos,

So I made some changes to do what you told me to, but have some problems 
checking if it works, since a simple case of just using an external variable 
like 

declare $a external;
$a

works correctly, but in all my examples theCompilerCB->theSctxMap has just 1 
Sctx in the map, so I tried to make a test module which uses an external 
variable and a function to return it, and used it in the query to see if that 
way I can get 2 queries, but I get an error of the external variable in the 
module, the error says "var": not in library namespace.

So I am wondering if this is the wrong way to test it, or if you could point me 
to an example where this having several static contexts with external variables 
in the map happen.

Thanks
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-20 Thread Markos Zaharioudakis
> > Second, to get the external variables from all the modules that participate
> in
> > a query, we also need a getExternalVariables() at the XQueryImpl level. This
> > method will go through all the static context objs in
> > theCompilerCB->theSctxMap and compute the union of the external variables
> > returned from each static ctx.
> 
> Ok so I have some questions:
> 
> So this function getExternalVariables in the XQueryImpl should return all the
> unions of the external variables? and make this function available for the
> api? or what Did you meant for compute the union?
> and Do I need to remove from the include/static_context.h the
> getExternalVariables function?

Both of the methods should appear in the c++ api, one in 
include/static_context.h and the other in include/xquery.h. The xqxq module 
should use the XQuery method.

-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-20 Thread Juan Zacarias
> Second, to get the external variables from all the modules that participate in
> a query, we also need a getExternalVariables() at the XQueryImpl level. This
> method will go through all the static context objs in
> theCompilerCB->theSctxMap and compute the union of the external variables
> returned from each static ctx.

Ok so I have some questions: 

So this function getExternalVariables in the XQueryImpl should return all the 
unions of the external variables? and make this function available for the api? 
or what Did you meant for compute the union?
and Do I need to remove from the include/static_context.h the 
getExternalVariables function?
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-20 Thread Markos Zaharioudakis
Ok, it looks better now, but we are not done yet

First, the comment in include/zorba/static_context.h for the 
getExternalVariables() method is wrong. The method returns the qnames of all 
the external variables that are in-scope within that static context. It's not 
about whether the variables are bound or not. 

Second, to get the external variables from all the modules that participate in 
a query, we also need a getExternalVariables() at the XQueryImpl level. This 
method will go through all the static context objs in theCompilerCB->theSctxMap 
and compute the union of the external variables returned from each static ctx.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-20 Thread Juan Zacarias
Done I changed the getExternalVariables to the staticContext.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-19 Thread Markos Zaharioudakis
Juan, the getExternalVariables method should be part of the static context, not 
the dynamic context.

Probably the easiest way to implement this is to add an "externalOnly" param to 
the static_context::getVariables method and then add a getExternalVariables 
method in StaticContextImpl, which will just invoke the 
static_context::getVariables method, passing true for the externalOnly param.

-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-18 Thread Matthias Brantner
Last minor stylistic comments from me:

- std::vector::iterator lIte => 
std::vector::const_iterator lIte 
-  if(program ->is_sequential()) => if (program->is_sequential())
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-18 Thread Juan Zacarias
changes done

> Yes, the zorba/ChangeLog file should mention bug fixes and such extensions.
> 
> Also, the tests themselves look good but you should compare for the expected
> result. For example, whether isSequential really returns true (instead of just
> outputting it).
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-18 Thread Matthias Brantner
Review: Needs Fixing

Yes, the zorba/ChangeLog file should mention bug fixes and such extensions.

Also, the tests themselves look good but you should compare for the expected 
result. For example, whether isSequential really returns true (instead of just 
outputting it).
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-18 Thread Juan Zacarias
I added the test in the test/unit/cxx_api_changes.cpp just one question, what 
you mena by mention my changes in ChangeLog, you mean in zorba/Changelog or did 
I miss in bazaar something?  


> Juan, could you please also provide some tests? The best places would either
> be doc/cxx/examples/context.cpp or test/unit/. Examples in the former file are
> mostly used for documentation purposes because those examples are linked from
> the web site. The latter directory contains unit tests.
> 
> Also, please don't forget to mention your changes in the ChangeLog.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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


Re: [Zorba-coders] [Merge] lp:~juan457/zorba/xqxq-api-changes into lp:zorba

2011-10-17 Thread Matthias Brantner
Review: Needs Fixing

Juan, could you please also provide some tests? The best places would either be 
doc/cxx/examples/context.cpp or test/unit/. Examples in the former file are 
mostly used for documentation purposes because those examples are linked from 
the web site. The latter directory contains unit tests.

Also, please don't forget to mention your changes in the ChangeLog.
-- 
https://code.launchpad.net/~juan457/zorba/xqxq-api-changes/+merge/79589
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