[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/148686 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/148686 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/148686 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/148686 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150698 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150698 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150698 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150698 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150714 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150714 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150714 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150714 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150714 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150714 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150755 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150755 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150755 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150755 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150791 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150791 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150791 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150791 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150801 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150801 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150801 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/150801 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151336 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151336 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151336 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151336 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151635 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151635 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151635 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151635 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151641 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151641 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151641 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151641 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151650 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151650 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151650 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151650 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof-merge into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof-merge into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof-merge/+merge/151673 -- https://code.launchpad.net/~nbrinza/zorba/hof-merge/+merge/151673 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/hof into lp:zorba
The proposal to merge lp:~nbrinza/zorba/hof into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 -- https://code.launchpad.net/~nbrinza/zorba/hof/+merge/151660 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:~zorba-coders/zorba/hof-merge into lp:zorba
Markos, I have moved it. -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/151673 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:~zorba-coders/zorba/hof-merge into lp:zorba
1) Nope, the order is correct. It was incorrect before I have reversed them. Here is the judgement from the spec: http://www.w3.org/TR/xquery-30/#id-itemtype-subtype -- Bi is function(Ba_1, Ba_2, ... Ba_N) as Br, Ai is function(Aa_1, Aa_2, ... Aa_M) as Ar, where N (arity of Bi) equals M (arity of Ai); subtype(Ar, Br); for values of I between 1 and N, subtype(Ba_I, Aa_I) ; Note: Function return types are covariant because this rule invokes subtype(Ar, Br) for return types. Function arguments are contravariant because this rule invokes subtype(Ba_I, Aa_I) for arguments. -- The QNAME should indeed be an EQNAME. I'll change it. There 1 test failure the remote queue reports seems to be random -- I've also seen various Excel tests failing randomly on the /hof branch. I've checked for memory errors with valgrind and there were none. https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/151673 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:~zorba-coders/zorba/hof-merge into lp:zorba
Markos, I've fixed the following issues you have reported (with changes merged into this branch): -- Also, the grammar rule for LiteralFunctionItem should use EQNAME, instead of QNAME. I've looked into it and the QNAME production actually covers EQNAMEs. I haven't tested it but they should work, as all the other grammar rules use the QNAME production. -- In typeops.cpp:749, you should not be casting AnyFunctionXQType to FunctionXQType. Fixed. -- is_equal() has not been implemented for function types. If you think it will never be called, then at least put an assertion to make sure that it will indeed never be called. I have implemented it. -- I think we should completely remove the option to enable/disable the HOF feature. I have removed it from the features system. -- There are also several failures in fn-function-lookup and misc-HigherOrderFunctions test sets. Are you aware of these failures? Yes, I'm aware. As I have said in an e-mail, the remaining failures are caused by the function-lookup() which I'm working on. On the other hand, there should be no failures in misc-HigherOrderFunctions, unless there are functions which use the $$context-position or $$context-size. I'll look into this. I will update the test/fots/CMakeLists.txt but it will take a while as FOTS has no progression registration mechanism as the rbkt testdriver has. -- In translator.cpp:3356 what is the reason for the arity checks for fn:number and fn:static-base-uri functions? I've looked into it and also run some tests and seems the checks are indeed redundant. I had copied the arity verification from the FunctionCall end_visit() translation, see e.g. translator.cpp:10875 in the Trunk branch. I have removed those checks. -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/151673 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/hof-merge into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/hof-merge into lp:zorba has been updated. Commit Message changed to: Implementation of higher order functions. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/hof-merge into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/hof-merge into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/hof-merge into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/hof-merge into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/hof-merge into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/hof-merge into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/hof-merge into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/hof-merge into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 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:~zorba-coders/zorba/hof-merge into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/hof-merge/+merge/153199 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:~zorba-coders/zorba/bug-1123162 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-1123162/+merge/154529 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154840 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154840 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154840 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154840 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Commit Message changed to: Empty block {} is a an empty json object For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154989 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154989 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154989 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154989 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Description changed to: Empty block {} is a an empty json object For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154989 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/154989 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:~zorba-coders/zorba/new-jsoniq into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/155270 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/155270 -- https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/155270 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. Requested reviews: Paul J. Lucas (paul-lucas) Nicolae Brinza (nbrinza) Matthias Brantner (matthias-brantner) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-03-27 14:33:29 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -728,7 +729,8 @@ Duration* Duration::operator*(const xs_double& value) const { xs_double result; - xs_double dSeconds; + xs_integer totalSeconds; + int32_t years; int32_t seconds; int32_t frac_seconds; @@ -738,19 +740,20 @@ return NULL; } - Integer significants = Integer(FRAC_SECONDS_UPPER_LIMIT); - try { result = getTotalSeconds() * value; -result = result.round(significants); -seconds = to_xs_int(result.floor()); +result = result.round(Integer(FRAC_SECONDS_UPPER_LIMIT)); +totalSeconds = result.floor(); result = (result - result.floor()) * FRAC_SECONDS_UPPER_LIMIT; + +years = to_xs_int(totalSeconds / seconds_per_year); +seconds = to_xs_int(totalSeconds % seconds_per_year); frac_seconds = to_xs_int(result.round()); } catch ( std::range_error const& ) { throw XQUERY_EXCEPTION(err::FODT0002); } - Duration* d = new Duration(facet, seconds<0, 0, 0, 0, 0, 0, seconds, frac_seconds); + Duration* d = new Duration(facet, totalSeconds<0, years, 0, 0, 0, 0, seconds, frac_seconds); return d; } @@ -758,7 +761,8 @@ Duration* Duration::operator/(const xs_double& value) const { xs_double result; - xs_double dSeconds; + xs_integer totalSeconds; + int32_t years; int32_t seconds; int32_t frac_seconds; @@ -768,20 +772,20 @@ return NULL; } - Integer significants = Integer(FRAC_SECONDS_UPPER_LIMIT); - try { result = getTotalSeconds() / value; -result = result.round(significants); -dSeconds = result.round(); -seconds = to_xs_int(dSeconds.floor()); -result = (result - dSeconds) * FRAC_SECONDS_UPPER_LIMIT; +result = result.round(Integer(FRAC_SECONDS_UPPER_LIMIT)); +totalSeconds = result.floor(); +result = (result - result.floor()) * FRAC_SECONDS_UPPER_LIMIT; + +years = to_xs_int(totalSeconds / seconds_per_year); +seconds = to_xs_int(totalSeconds % seconds_per_year); frac_seconds = to_xs_int(result.round()); } catch ( std::range_error const& ) { throw XQUERY_EXCEPTION(err::FODT0002); } - Duration* d = new Duration(facet, seconds<0, 0, 0, 0, 0, 0, seconds, frac_seconds); + Duration* d = new Duration(facet, totalSeconds<0, years, 0, 0, 0, 0, seconds, frac_seconds); return d; } === renamed file 'test/rbkt/ExpQueryResults/zorba/HigherOrder/hof-101.res' => 'test/rbkt/ExpQueryResults/zorba/HigherOrder/combinator-02.xml.res' --- test/rbkt/ExpQueryResults/zorba/HigherOrder/hof-101.res 2013-02-07 17:24:36 + +++ test/rbkt/ExpQueryResults/zorba/HigherOrder/combinator-02.xml.res 2013-03-27 14:33:29 + @@ -1,1 +1,2 @@ +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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:~nbrinza/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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:~nbrinza/zorba/bugs2 into lp:zorba
It's a duration. It does not have a start/end date. So you cannot possibly know if you're in a leap year. I've searched a bit, but I cannot find the spec where it says how to perform the duration normalization, but the code in Duration::normalize() assumes a year has 60 * 60 * 24 * 30 * 12 seconds. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. Requested reviews: Nicolae Brinza (nbrinza) Paul J. Lucas (paul-lucas) Zorba Coders (zorba-coders) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155767 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155767 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into lp:zorba. === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-03-27 15:33:50 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -728,9 +729,11 @@ Duration* Duration::operator*(const xs_double& value) const { xs_double result; - xs_double dSeconds; + xs_integer totalSeconds; + int32_t years; int32_t seconds; int32_t frac_seconds; + bool negative = false; if (facet == DURATION_FACET) { @@ -738,19 +741,25 @@ return NULL; } - Integer significants = Integer(FRAC_SECONDS_UPPER_LIMIT); - try { result = getTotalSeconds() * value; -result = result.round(significants); -seconds = to_xs_int(result.floor()); +if (result < 0) +{ + negative = true; + result = -result; +} +result = result.round(Integer(FRAC_SECONDS_UPPER_LIMIT)); +totalSeconds = result.floor(); result = (result - result.floor()) * FRAC_SECONDS_UPPER_LIMIT; + +years = to_xs_int(totalSeconds / seconds_per_year); +seconds = to_xs_int(totalSeconds % seconds_per_year); frac_seconds = to_xs_int(result.round()); } catch ( std::range_error const& ) { throw XQUERY_EXCEPTION(err::FODT0002); } - Duration* d = new Duration(facet, seconds<0, 0, 0, 0, 0, 0, seconds, frac_seconds); + Duration* d = new Duration(facet, negative, years, 0, 0, 0, 0, seconds, frac_seconds); return d; } @@ -758,9 +767,11 @@ Duration* Duration::operator/(const xs_double& value) const { xs_double result; - xs_double dSeconds; + xs_integer totalSeconds; + int32_t years; int32_t seconds; int32_t frac_seconds; + bool negative = false; if (facet == DURATION_FACET) { @@ -768,20 +779,25 @@ return NULL; } - Integer significants = Integer(FRAC_SECONDS_UPPER_LIMIT); - try { result = getTotalSeconds() / value; -result = result.round(significants); -dSeconds = result.round(); -seconds = to_xs_int(dSeconds.floor()); -result = (result - dSeconds) * FRAC_SECONDS_UPPER_LIMIT; +if (result < 0) +{ + negative = true; + result = -result; +} +result = result.round(Integer(FRAC_SECONDS_UPPER_LIMIT)); +totalSeconds = result.floor(); +result = (result - result.floor()) * FRAC_SECONDS_UPPER_LIMIT; + +years = to_xs_int(totalSeconds / seconds_per_year); +seconds = to_xs_int(totalSeconds % seconds_per_year); frac_seconds = to_xs_int(result.round()); } catch ( std::range_error const& ) { throw XQUERY_EXCEPTION(err::FODT0002); } - Duration* d = new Duration(facet, seconds<0, 0, 0, 0, 0, 0, seconds, frac_seconds); + Duration* d = new Duration(facet, negative, years, 0, 0, 0, 0, seconds, frac_seconds); return d; } === modified file 'test/fots/CMakeLists.txt' --- test/fots/CMakeLists.txt 2013-03-27 09:26:16 + +++ test/fots/CMakeLists.txt 2013-03-27 15:33:50 + @@ -135,8 +135,6 @@ EXPECTED_FOTS_FAILURE (fn-adjust-dateTime-to-timezone cbcl-adjust-dateTime-to-timezone-003 0) EXPECTED_FOTS_FAILURE (fn-adjust-dateTime-to-timezone cbcl-adjust-dateTime-to-timezone-004 0) EXPECTED_FOTS_FAILURE (fn-available-environment-variables fn-available-environment-variables-011 0) -EXPECTED_FOTS_FAILURE (fn-avg cbcl-avg-002 0) -EXPECTED_FOTS_FAILURE (fn-avg cbcl-avg-003 0) EXPECTED_FOTS_FAILURE (fn-collection fn-collection-4 0) EXPECTED_FOTS_FAILURE (fn-collection fn-collection-4d 0) EXPECTED_FOTS_FAILURE (fn-collection fn-collection-5 0) @@ -165,15 +163,12 @@ EXPECTED_FOTS_FAILURE (fn-environment-variable environment-variable-005 0) EXPECTED_FOTS_FAILURE (fn-environment-variable environment-variable-006 0) EXPECTED_FOTS_FAILURE (fn-environment-variable environment-variable-007 0) -EXPECTED_FOTS_FAILURE (fn-format-
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155767 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155767 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155767 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155767 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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:~nbrinza/zorba/bugs2 into lp:zorba
I've looked into it. It is not a spec issue, it's an implementation choice. The multiply/divide are only defined on the yearMonthDuration and dayTimeDuration data types. For both of these types, and for the purpose of multiplication/division, assuming a year has 60 * 60 * 24 * 30 * 12 seconds works perfectly. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155745 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. Requested reviews: Paul J. Lucas (paul-lucas) Nicolae Brinza (nbrinza) Zorba Coders (zorba-coders) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 Bug #1154367 in Zorba: "yearMonthDuration arithmetic bug" https://bugs.launchpad.net/zorba/+bug/1154367 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into lp:zorba. === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-03-27 16:02:43 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -728,9 +729,11 @@ Duration* Duration::operator*(const xs_double& value) const { xs_double result; - xs_double dSeconds; + xs_integer totalSeconds; + int32_t years; int32_t seconds; int32_t frac_seconds; + bool negative = false; if (facet == DURATION_FACET) { @@ -738,19 +741,25 @@ return NULL; } - Integer significants = Integer(FRAC_SECONDS_UPPER_LIMIT); - try { result = getTotalSeconds() * value; -result = result.round(significants); -seconds = to_xs_int(result.floor()); +if (result < 0) +{ + negative = true; + result = -result; +} +result = result.round(Integer(FRAC_SECONDS_UPPER_LIMIT)); +totalSeconds = result.floor(); result = (result - result.floor()) * FRAC_SECONDS_UPPER_LIMIT; + +years = to_xs_int(totalSeconds / seconds_per_year); +seconds = to_xs_int(totalSeconds % seconds_per_year); frac_seconds = to_xs_int(result.round()); } catch ( std::range_error const& ) { throw XQUERY_EXCEPTION(err::FODT0002); } - Duration* d = new Duration(facet, seconds<0, 0, 0, 0, 0, 0, seconds, frac_seconds); + Duration* d = new Duration(facet, negative, years, 0, 0, 0, 0, seconds, frac_seconds); return d; } @@ -758,9 +767,11 @@ Duration* Duration::operator/(const xs_double& value) const { xs_double result; - xs_double dSeconds; + xs_integer totalSeconds; + int32_t years; int32_t seconds; int32_t frac_seconds; + bool negative = false; if (facet == DURATION_FACET) { @@ -768,20 +779,25 @@ return NULL; } - Integer significants = Integer(FRAC_SECONDS_UPPER_LIMIT); - try { result = getTotalSeconds() / value; -result = result.round(significants); -dSeconds = result.round(); -seconds = to_xs_int(dSeconds.floor()); -result = (result - dSeconds) * FRAC_SECONDS_UPPER_LIMIT; +if (result < 0) +{ + negative = true; + result = -result; +} +result = result.round(Integer(FRAC_SECONDS_UPPER_LIMIT)); +totalSeconds = result.floor(); +result = (result - result.floor()) * FRAC_SECONDS_UPPER_LIMIT; + +years = to_xs_int(totalSeconds / seconds_per_year); +seconds = to_xs_int(totalSeconds % seconds_per_year); frac_seconds = to_xs_int(result.round()); } catch ( std::range_error const& ) { throw XQUERY_EXCEPTION(err::FODT0002); } - Duration* d = new Duration(facet, seconds<0, 0, 0, 0, 0, 0, seconds, frac_seconds); + Duration* d = new Duration(facet, negative, years, 0, 0, 0, 0, seconds, frac_seconds); return d; } === modified file 'test/fots/CMakeLists.txt' --- test/fots/CMakeLists.txt 2013-03-27 09:26:16 + +++ test/fots/CMakeLists.txt 2013-03-27 16:02:43 + @@ -135,8 +135,6 @@ EXPECTED_FOTS_FAILURE (fn-adjust-dateTime-to-timezone cbcl-adjust-dateTime-to-timezone-003 0) EXPECTED_FOTS_FAILURE (fn-adjust-dateTime-to-timezone cbcl-adjust-dateTime-to-timezone-004 0) EXPECTED_FOTS_FAILURE (fn-available-environment-variables fn-available-environment-variables-011 0) -EXPECTED_FOTS_FAILURE (fn-avg cbcl-avg-002 0) -EXPECTED_FOTS_FAILURE (fn-avg cbcl-avg-003 0) EXPECTED_FOTS_FAILURE (fn-collection fn-collection-4 0) EXPECTED_FOTS_FAILURE (fn-collection fn-collection-4d 0) EXPECTED_FOTS_FAILURE (fn-collection fn-collection-5 0) @@ -165,15 +163,12 @@ EXPECTED_FOTS_FAILURE (fn-environment-variable environment-variable-005 0) EXPECTED_FOTS_FAILURE (fn-environment-variable environment-va
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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:~nbrinza/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/155856 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/155856 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:~zorba-coders/zorba/feature-empty_object into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/155856 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-empty_object into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/feature-empty_object into lp:zorba has been updated. Description changed to: BlockExpression allows for ::= LBRACE RBRACE and interprets it as an empty object; removed ::= LBRACE RBRACE from the JSONObjectConstructor For more details, see: https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/155856 -- https://code.launchpad.net/~zorba-coders/zorba/feature-empty_object/+merge/155856 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:~zorba-coders/zorba/bug-1123163 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-1123163/+merge/156322 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:~nbrinza/zorba/bugs2 into lp:zorba
I have added the location and the value. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. Requested reviews: Nicolae Brinza (nbrinza) Paul J. Lucas (paul-lucas) Chris Hillery (ceejatec) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 Bug #1154367 in Zorba: "yearMonthDuration arithmetic bug" https://bugs.launchpad.net/zorba/+bug/1154367 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-03-24 19:05:42 + +++ src/diagnostics/diagnostic_en.xml 2013-04-01 21:54:27 + @@ -1316,7 +1316,7 @@ Overflow/underflow in duration operation. - overflow/underflow in duration operation + overflow/underflow in duration operation${: 1} === modified file 'src/diagnostics/pregenerated/dict_en.cpp' --- src/diagnostics/pregenerated/dict_en.cpp 2013-03-24 19:05:42 + +++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-01 21:54:27 + @@ -50,7 +50,7 @@ { "FODF1280", "\"$1\": invalid decimal format name for fn:format-number()" }, { "FODF1310", "\"$1\": invalid fn:format-number() picture string$2" }, { "FODT0001", "overflow/underflow in date/time operation" }, - { "FODT0002", "overflow/underflow in duration operation" }, + { "FODT0002", "overflow/underflow in duration operation${: 1}" }, { "FODT0003", "\"$1\": invalid timezone value (in seconds)" }, { "FOER", "unidentifier error" }, { "FOFD1340", "\"$1\": invalid picture string for date/time${: 2}" }, === modified file 'src/runtime/core/arithmetic_impl.cpp' --- src/runtime/core/arithmetic_impl.cpp 2013-03-20 19:12:54 + +++ src/runtime/core/arithmetic_impl.cpp 2013-04-01 21:54:27 + @@ -596,8 +596,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getYearMonthDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -618,8 +622,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } @@ -674,8 +682,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d = std::auto_ptr(i0->getYearMonthDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -700,8 +712,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-04-01 21:54:27 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -725,12 +726,26 @@ } +#define TRY_XS_INT_CONVERT(target, value, xs_type)\ + {
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 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:~nbrinza/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156431 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:~nbrinza/zorba/bugs2 into lp:zorba
No, I believe the construction of "res" and the conversion will be useless in the most common case where the error does not happen. But I've copy pasted your suggestion anyway. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/155778 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Requested reviews: Nicolae Brinza (nbrinza) Chris Hillery (ceejatec) Paul J. Lucas (paul-lucas) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 Bug #1154367 in Zorba: "yearMonthDuration arithmetic bug" https://bugs.launchpad.net/zorba/+bug/1154367 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-04-01 02:22:49 + +++ src/diagnostics/diagnostic_en.xml 2013-04-02 20:21:25 + @@ -1355,7 +1355,7 @@ Overflow/underflow in duration operation. - overflow/underflow in duration operation + overflow/underflow in duration operation${: 1} === modified file 'src/diagnostics/pregenerated/dict_en.cpp' --- src/diagnostics/pregenerated/dict_en.cpp 2013-04-01 02:22:49 + +++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-02 20:21:25 + @@ -50,7 +50,7 @@ { "FODF1280", "\"$1\": invalid decimal format name for fn:format-number()" }, { "FODF1310", "\"$1\": invalid picture string for decimal/integer${: 2}" }, { "FODT0001", "overflow/underflow in date/time operation" }, - { "FODT0002", "overflow/underflow in duration operation" }, + { "FODT0002", "overflow/underflow in duration operation${: 1}" }, { "FODT0003", "\"$1\": invalid timezone value (in seconds)" }, { "FOER", "unidentifier error" }, { "FOFD1340", "\"$1\": invalid picture string for date/time${: 2}" }, === modified file 'src/runtime/core/arithmetic_impl.cpp' --- src/runtime/core/arithmetic_impl.cpp 2013-03-20 19:12:54 + +++ src/runtime/core/arithmetic_impl.cpp 2013-04-02 20:21:25 + @@ -596,8 +596,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getYearMonthDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -618,8 +622,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } @@ -674,8 +682,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d = std::auto_ptr(i0->getYearMonthDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -700,8 +712,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-04-02 20:21:25 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -725,12 +726,24 @@ } +#define TRY_XS_INT_CONVERT(target, value, xs_type) \ + {\ +xs_type const res(value);
Re: [Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156674 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. Requested reviews: Nicolae Brinza (nbrinza) Chris Hillery (ceejatec) Paul J. Lucas (paul-lucas) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 Bug #1154367 in Zorba: "yearMonthDuration arithmetic bug" https://bugs.launchpad.net/zorba/+bug/1154367 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-04-01 02:22:49 + +++ src/diagnostics/diagnostic_en.xml 2013-04-02 21:40:33 + @@ -1355,7 +1355,7 @@ Overflow/underflow in duration operation. - overflow/underflow in duration operation + overflow/underflow in duration operation${: 1} === modified file 'src/diagnostics/pregenerated/dict_en.cpp' --- src/diagnostics/pregenerated/dict_en.cpp 2013-04-01 02:22:49 + +++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-02 21:40:33 + @@ -50,7 +50,7 @@ { "FODF1280", "\"$1\": invalid decimal format name for fn:format-number()" }, { "FODF1310", "\"$1\": invalid picture string for decimal/integer${: 2}" }, { "FODT0001", "overflow/underflow in date/time operation" }, - { "FODT0002", "overflow/underflow in duration operation" }, + { "FODT0002", "overflow/underflow in duration operation${: 1}" }, { "FODT0003", "\"$1\": invalid timezone value (in seconds)" }, { "FOER", "unidentifier error" }, { "FOFD1340", "\"$1\": invalid picture string for date/time${: 2}" }, === modified file 'src/runtime/core/arithmetic_impl.cpp' --- src/runtime/core/arithmetic_impl.cpp 2013-03-20 19:12:54 + +++ src/runtime/core/arithmetic_impl.cpp 2013-04-02 21:40:33 + @@ -596,8 +596,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getYearMonthDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -618,8 +622,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } @@ -674,8 +682,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d = std::auto_ptr(i0->getYearMonthDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -700,8 +712,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-04-02 21:40:33 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -725,12 +726,24 @@ } +#define TRY_XS_INT_CONVERT(target, value, xs_type) \ + {
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 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:~nbrinza/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs3 into lp:zorba. Commit message: Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b Requested reviews: Nicolae Brinza (nbrinza) Chris Hillery (ceejatec) Related bugs: Bug #1114228 in Zorba: ""prod-OptionDecl" failure" https://bugs.launchpad.net/zorba/+bug/1114228 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2013-04-01 02:48:23 + +++ ChangeLog 2013-04-02 21:49:23 + @@ -36,6 +36,7 @@ * Extented index join rule to general flwor expressions. Bug Fixes/Other Changes: + * Fixed bug #1114228 (unrecognized options in the XQuery namespace now raise an error) * Fixed bug #1124273 (xqdoc crash because of annotation literals) * Fixed bug #867027 (XQST0059 error messages inconsistent) * Fixed bug #1095889 (Improve error message for xml-parsing error). === modified file 'include/zorba/pregenerated/diagnostic_list.h' --- include/zorba/pregenerated/diagnostic_list.h 2013-03-28 05:32:59 + +++ include/zorba/pregenerated/diagnostic_list.h 2013-04-02 21:49:23 + @@ -158,6 +158,8 @@ extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0111; +extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0123; + extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0002; extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0050; === modified file 'modules/w3c/pregenerated/xqt-errors.xq' --- modules/w3c/pregenerated/xqt-errors.xq 2013-03-28 05:32:59 + +++ modules/w3c/pregenerated/xqt-errors.xq 2013-04-02 21:49:23 + @@ -674,6 +674,14 @@ (:~ : + : It is a static error if the name of a feature in require-feature is not recognized by the implementation. + : + : @see http://www.w3.org/2005/xqt-errors +:) +declare variable $err:XQST0123 as xs:QName := fn:QName($err:NS, "err:XQST0123"); + +(:~ + : : It is a dynamic error if evaluation of an expression relies on some part : of the dynamic context that has not been assigned a value. : === modified file 'src/compiler/parser/xquery_scanner.l' --- src/compiler/parser/xquery_scanner.l 2013-03-18 18:10:14 + +++ src/compiler/parser/xquery_scanner.l 2013-04-02 21:49:23 + @@ -295,7 +295,9 @@ | | Entity definitions |__*/ -CharRef "&#"([0-9]+|x([0-9]|[a-f]|[A-F])+)";" + // CharRef "&#"([0-9]+|x([0-9]|[a-f]|[A-F])+)";" + +CharRef "&#"([1-9][0-9]*|x(([1-9]|[a-f]|[A-F])([0-9]|[a-f]|[A-F])*))";" PredefinedEntityRef "&"(lt|gt|amp|quot|apos|nbsp)";" Ref {CharRef}|{PredefinedEntityRef} === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-03-27 12:40:41 + +++ src/compiler/translator/translator.cpp 2013-04-02 21:49:23 + @@ -3525,7 +3525,7 @@ { theSctx->expand_qname( qnameItem, - static_context::XQUERY_OPTION_NS, + static_context::XQUERY_NS, "", lQName->get_localname(), lQName->get_location()); @@ -3539,6 +3539,14 @@ } } + if (qnameItem->getNamespace() == static_context::XQUERY_NS + && + qnameItem->getLocalName() != "require-feature" + && + qnameItem->getLocalName() != "prohibit-feature") + { +RAISE_ERROR(err::XQST0123, loc, ERROR_PARAMS(ZED(UnrecognizedXQueryOption), qnameItem->getLocalName())); + } if (qnameItem->getNamespace() == static_context::ZORBA_OPTION_FEATURE_NS && value == "http-uri-resolution") === modified file 'src/context/static_context.cpp' --- src/context/static_context.cpp 2013-03-22 00:49:51 + +++ src/context/static_context.cpp 2013-04-02 21:49:23 + @@ -512,6 +512,10 @@ "http://www.zorba-xquery.com/options/optimizer";; const char* +static_context::XQUERY_NS = +"http://www.w3.org/2012/xquery";; + +const char* static_context::XQUERY_OPTION_NS = "http://www.w3.org/2011/xquery-options";; === modified file 'src/context/static_context.h' --- src/context/static_context.h 2013-03-22 00:49:51 + +++ src/context/static_context.h 2013-04-02 21:49:23 + @@ -567,7 +567,8 @@ static const char* ZORBA_OPTION_WARN_NS; static const char* ZORBA_OPTION_FEATURE_NS; static const char* ZORBA_OPTION_OPTIM_NS; - static const char* XQUERY_
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs3 into lp:zorba has been updated. Commit Message changed to: Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs3 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 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:~nbrinza/zorba/bugs3 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 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:~zorba-coders/zorba/bug-1130998 into lp:zorba
Luis, after you run "make", you'll need to run the ./copyparser.sh script in the build folder. It will updated the above files that report a conflict. -- https://code.launchpad.net/~zorba-coders/zorba/bug-1130998/+merge/156700 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:~zorba-coders/zorba/bug-1130998 into lp:zorba
You will also have to update jsoniq_scanner.l file with the changes that you did, but be careful not to change anything else. Do not copy over the entire file, just the changes. -- https://code.launchpad.net/~zorba-coders/zorba/bug-1130998/+merge/156700 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156698 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:~zorba-coders/zorba/fix_bug_1028879 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix_bug_1028879/+merge/156718 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix_bug_1028879 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/fix_bug_1028879 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix_bug_1028879/+merge/156718 -- https://code.launchpad.net/~zorba-coders/zorba/fix_bug_1028879/+merge/156718 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. Requested reviews: Nicolae Brinza (nbrinza) Chris Hillery (ceejatec) Paul J. Lucas (paul-lucas) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 Bug #1154367 in Zorba: "yearMonthDuration arithmetic bug" https://bugs.launchpad.net/zorba/+bug/1154367 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-04-01 02:22:49 + +++ src/diagnostics/diagnostic_en.xml 2013-04-03 03:40:32 + @@ -1355,7 +1355,7 @@ Overflow/underflow in duration operation. - overflow/underflow in duration operation + overflow/underflow in duration operation${: 1} === modified file 'src/diagnostics/pregenerated/dict_en.cpp' --- src/diagnostics/pregenerated/dict_en.cpp 2013-04-01 02:22:49 + +++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-03 03:40:32 + @@ -50,7 +50,7 @@ { "FODF1280", "\"$1\": invalid decimal format name for fn:format-number()" }, { "FODF1310", "\"$1\": invalid picture string for decimal/integer${: 2}" }, { "FODT0001", "overflow/underflow in date/time operation" }, - { "FODT0002", "overflow/underflow in duration operation" }, + { "FODT0002", "overflow/underflow in duration operation${: 1}" }, { "FODT0003", "\"$1\": invalid timezone value (in seconds)" }, { "FOER", "unidentifier error" }, { "FOFD1340", "\"$1\": invalid picture string for date/time${: 2}" }, === modified file 'src/runtime/core/arithmetic_impl.cpp' --- src/runtime/core/arithmetic_impl.cpp 2013-03-20 19:12:54 + +++ src/runtime/core/arithmetic_impl.cpp 2013-04-03 03:40:32 + @@ -596,8 +596,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getYearMonthDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -618,8 +622,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if (i1->getDoubleValue().isNaN()) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() * (i1->getDoubleValue())); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } @@ -674,8 +682,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d = std::auto_ptr(i0->getYearMonthDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createYearMonthDuration(result, d.get()); } @@ -700,8 +712,12 @@ throw XQUERY_EXCEPTION( err::FODT0002, ERROR_LOC( loc ) ); else if ( i1->getDoubleValue().isNaN() ) throw XQUERY_EXCEPTION( err::FOCA0005, ERROR_LOC( loc ) ); - else + else try { d.reset(i0->getDayTimeDurationValue() / i1->getDoubleValue()); + } catch (XQueryException& e) { +set_source(e, *loc); +throw; + } return GENV_ITEMFACTORY->createDayTimeDuration(result, d.get()); } === modified file 'src/zorbatypes/datetime/duration.cpp' --- src/zorbatypes/datetime/duration.cpp 2013-03-11 15:00:50 + +++ src/zorbatypes/datetime/duration.cpp 2013-04-03 03:40:32 + @@ -41,6 +41,7 @@ 0, 12, 30, 24, 60, 60, Duration::FRAC_SECONDS_UPPER_LIMIT }; +static const long seconds_per_year = 60 * 60 * 24 * 30 * 12; /** Parse a 'nS' string, with fractional seconds, returns 0 on success and a @@ -725,12 +726,24 @@ } +#define TRY_XS_INT_CONVERT(target, value, xs_type) \ + {
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: Fixed the duration arithemtic bug. Added missing testcases for HoF bugs. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 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:~nbrinza/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156732 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs3 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156703 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs3 into lp:zorba. Commit message: Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b Requested reviews: Nicolae Brinza (nbrinza) Chris Hillery (ceejatec) Related bugs: Bug #1114228 in Zorba: ""prod-OptionDecl" failure" https://bugs.launchpad.net/zorba/+bug/1114228 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2013-04-01 02:48:23 + +++ ChangeLog 2013-04-03 04:02:29 + @@ -36,6 +36,7 @@ * Extented index join rule to general flwor expressions. Bug Fixes/Other Changes: + * Fixed bug #1114228 (unrecognized options in the XQuery namespace now raise an error) * Fixed bug #1124273 (xqdoc crash because of annotation literals) * Fixed bug #867027 (XQST0059 error messages inconsistent) * Fixed bug #1095889 (Improve error message for xml-parsing error). === modified file 'include/zorba/pregenerated/diagnostic_list.h' --- include/zorba/pregenerated/diagnostic_list.h 2013-03-28 05:32:59 + +++ include/zorba/pregenerated/diagnostic_list.h 2013-04-03 04:02:29 + @@ -158,6 +158,8 @@ extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0111; +extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0123; + extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0002; extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0050; === modified file 'modules/w3c/pregenerated/xqt-errors.xq' --- modules/w3c/pregenerated/xqt-errors.xq 2013-03-28 05:32:59 + +++ modules/w3c/pregenerated/xqt-errors.xq 2013-04-03 04:02:29 + @@ -674,6 +674,14 @@ (:~ : + : It is a static error if the name of a feature in require-feature is not recognized by the implementation. + : + : @see http://www.w3.org/2005/xqt-errors +:) +declare variable $err:XQST0123 as xs:QName := fn:QName($err:NS, "err:XQST0123"); + +(:~ + : : It is a dynamic error if evaluation of an expression relies on some part : of the dynamic context that has not been assigned a value. : === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2013-03-27 12:40:41 + +++ src/compiler/translator/translator.cpp 2013-04-03 04:02:29 + @@ -3525,7 +3525,7 @@ { theSctx->expand_qname( qnameItem, - static_context::XQUERY_OPTION_NS, + static_context::XQUERY_NS, "", lQName->get_localname(), lQName->get_location()); @@ -3539,6 +3539,14 @@ } } + if (qnameItem->getNamespace() == static_context::XQUERY_NS + && + qnameItem->getLocalName() != "require-feature" + && + qnameItem->getLocalName() != "prohibit-feature") + { +RAISE_ERROR(err::XQST0123, loc, ERROR_PARAMS(ZED(UnrecognizedXQueryOption), qnameItem->getLocalName())); + } if (qnameItem->getNamespace() == static_context::ZORBA_OPTION_FEATURE_NS && value == "http-uri-resolution") === modified file 'src/context/static_context.cpp' --- src/context/static_context.cpp 2013-03-22 00:49:51 + +++ src/context/static_context.cpp 2013-04-03 04:02:29 + @@ -512,6 +512,10 @@ "http://www.zorba-xquery.com/options/optimizer";; const char* +static_context::XQUERY_NS = +"http://www.w3.org/2012/xquery";; + +const char* static_context::XQUERY_OPTION_NS = "http://www.w3.org/2011/xquery-options";; === modified file 'src/context/static_context.h' --- src/context/static_context.h 2013-03-22 00:49:51 + +++ src/context/static_context.h 2013-04-03 04:02:29 + @@ -567,7 +567,8 @@ static const char* ZORBA_OPTION_WARN_NS; static const char* ZORBA_OPTION_FEATURE_NS; static const char* ZORBA_OPTION_OPTIM_NS; - static const char* XQUERY_OPTION_NS; + static const char* XQUERY_NS; // http://www.w3.org/2012/xquery + static const char* XQUERY_OPTION_NS; // http://www.w3.org/2011/xquery-options static const char* ZORBA_VERSIONING_NS; protected: === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-04-01 02:22:49 + +++ src/diagnostics/diagnostic_en.xml 2013-04-03 04:02:29 + @@ -814,6 +814,13 @@ $1 + + + It is a static error if the name of a feature in require-feature is not recognized by the implementation. + + $1 + + It is a dynamic error if evaluation of an expression relies on some part @@ -5007,6 +5014,10 @@ &
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs3 into lp:zorba has been updated. Commit Message changed to: Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 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:~nbrinza/zorba/bugs3 into lp:zorba
Review: Approve -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs3 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs3 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 -- https://code.launchpad.net/~nbrinza/zorba/bugs3/+merge/156734 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs2 into lp:zorba. Commit message: date/time/durations castings now throw FODT0001 instead of FORG0001, as required by the 3.0 spec. Requested reviews: Zorba Coders (zorba-coders) Related bugs: Bug #898792 in Zorba: "xs:QName fails for non-literal input" https://bugs.launchpad.net/zorba/+bug/898792 Bug #931501 in Zorba: "improve error message for fn:format-number" https://bugs.launchpad.net/zorba/+bug/931501 Bug #1154367 in Zorba: "yearMonthDuration arithmetic bug" https://bugs.launchpad.net/zorba/+bug/1154367 For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 date/time/durations castings now throw FODT0001 instead of FORG0001, as required by the 3.0 spec. -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into lp:zorba. === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2013-04-03 07:30:48 + +++ src/diagnostics/diagnostic_en.xml 2013-04-03 08:29:30 + @@ -1355,7 +1355,7 @@ Overflow/underflow in date/time operation. - overflow/underflow in date/time operation + overflow/underflow in date/time operation${: 1} === modified file 'src/diagnostics/pregenerated/dict_en.cpp' --- src/diagnostics/pregenerated/dict_en.cpp 2013-04-03 07:30:48 + +++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-03 08:29:30 + @@ -49,7 +49,7 @@ { "FODC0007", "\"$1\": base URI passed to fn:parse() is not a valid absolute URI" }, { "FODF1280", "\"$1\": invalid decimal format name for fn:format-number()" }, { "FODF1310", "\"$1\": invalid picture string for decimal/integer${: 2}" }, - { "FODT0001", "overflow/underflow in date/time operation" }, + { "FODT0001", "overflow/underflow in date/time operation${: 1}" }, { "FODT0002", "overflow/underflow in duration operation${: 1}" }, { "FODT0003", "\"$1\": invalid timezone value (in seconds)" }, { "FOER", "unidentifier error" }, === modified file 'src/types/casting.cpp' --- src/types/casting.cpp 2013-03-26 20:23:10 + +++ src/types/casting.cpp 2013-04-03 08:29:30 + @@ -182,6 +182,36 @@ } } +void throwFODT0001Exception(const zstring& str, const ErrorInfo& info) +{ + if (info.theTargetType) + { +RAISE_ERROR(err::FODT0001, info.theLoc, +ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), + str, + info.theSourceType->toSchemaString(), + info.theTargetType->toSchemaString())); + } + else + { +TypeManager& tm = GENV_TYPESYSTEM; + +xqtref_t sourceType = +tm.create_builtin_atomic_type(info.theSourceTypeCode, + TypeConstants::QUANT_ONE); + +xqtref_t targetType = +tm.create_builtin_atomic_type(info.theTargetTypeCode, + TypeConstants::QUANT_ONE); + +RAISE_ERROR(err::FODT0001, info.theLoc, +ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), + str, + sourceType->toSchemaString(), + targetType->toSchemaString())); + } +} + /*** Identity casting functions: target type is the same as the source one, so no @@ -343,7 +373,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -358,7 +388,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -373,7 +403,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -386,7 +416,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -400,7 +430,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -413,7 +443,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -426,7 +456,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -439,7 +469,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -452,7 +482,7 @@ return; } - throwFORG0001Exception(strval, errInfo); + throwFODT0001Exception(strval, errInfo); } @@ -465,7 +495,7 @@ return; } - throwFORG0001Exception(s
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1160559-unionTypeError into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug1160559-unionTypeError/+merge/156760 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: date/time/durations castings now throw FODT0001 instead of FORG0001, as required by the 3.0 spec. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1160559-unionTypeError into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug1160559-unionTypeError into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1160559-unionTypeError/+merge/156760 -- https://code.launchpad.net/~zorba-coders/zorba/bug1160559-unionTypeError/+merge/156760 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 Your team Zorba Coders is requested to review the proposed merge of lp:~nbrinza/zorba/bugs2 into 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Commit Message changed to: overflows in date/time casts now return FODT0001 and in durations return FODT0002. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Description changed to: overflows in date/time casts now return FODT0001 and in durations return FODT0002. For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 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
[Zorba-coders] [Merge] lp:~nbrinza/zorba/bugs2 into lp:zorba
The proposal to merge lp:~nbrinza/zorba/bugs2 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 -- https://code.launchpad.net/~nbrinza/zorba/bugs2/+merge/156766 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