Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-1188100 into lp:zorba.
Commit message: Now converting regex in fn:tokenize(). Requested reviews: Paul J. Lucas (paul-lucas) Related bugs: Bug #1188100 in Zorba: "regex issues with 'q' flag in fn:tokenize" https://bugs.launchpad.net/zorba/+bug/1188100 For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-1188100/+merge/167826 Now converting regex in fn:tokenize(). -- https://code.launchpad.net/~paul-lucas/zorba/bug-1188100/+merge/167826 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog' --- ChangeLog 2013-06-03 23:05:34 +0000 +++ ChangeLog 2013-06-06 18:35:30 +0000 @@ -22,6 +22,7 @@ * Fixed implementation of fn:deep-equal according to latest W3C spec. * Must apply document ordering on the domain expression of a FOR clause, if the FOR clause is followed by a sequential clause. + * Fixed bug #1188100 (regex issues with 'q' flag in fn:tokenize) * Fixed invalid memory access error occuring during sequence type matching for user-defined types. === modified file 'src/runtime/strings/strings_impl.cpp' --- src/runtime/strings/strings_impl.cpp 2013-05-09 00:21:51 +0000 +++ src/runtime/strings/strings_impl.cpp 2013-06-06 18:35:30 +0000 @@ -1688,10 +1688,9 @@ store::Item_t& result, PlanState& planState) const { - zstring token; + zstring pattern, token; store::Item_t item; bool tmp; - zstring strval; unicode::string u_string; FnTokenizeIteratorState* state; @@ -1699,28 +1698,24 @@ if (consumeNext(item, theChildren[0].getp(), planState)) { - item->getStringValue2(strval); - state->theString = strval.str(); + item->getStringValue2(state->theString); } if (!consumeNext(item, theChildren[1].getp(), planState)) ZORBA_ASSERT(false); - item->getStringValue2(strval); - state->thePattern = strval.str(); + item->getStringValue2(pattern); if(theChildren.size() == 3) { if (!consumeNext(item, theChildren[2].getp(), planState)) ZORBA_ASSERT (false); - - item->getStringValue2(strval); - - state->theFlags = strval.str(); + item->getStringValue2(state->theFlags); } try { + convert_xquery_re( pattern, &state->thePattern, state->theFlags.c_str() ); static zstring const empty; tmp = utf8::match_part( empty, state->thePattern, state->theFlags ); } @@ -1732,7 +1727,7 @@ if(tmp) throw XQUERY_EXCEPTION( - err::FORX0003, ERROR_PARAMS( state->thePattern ), ERROR_LOC( loc ) + err::FORX0003, ERROR_PARAMS( pattern ), ERROR_LOC( loc ) ); === modified file 'test/fots/CMakeLists.txt' --- test/fots/CMakeLists.txt 2013-06-05 15:06:53 +0000 +++ test/fots/CMakeLists.txt 2013-06-06 18:35:30 +0000 @@ -167,8 +167,6 @@ EXPECTED_FOTS_FAILURE (fn-serialize serialize-xml-008 0) EXPECTED_FOTS_FAILURE (fn-string-length fn-string-length-22 0) EXPECTED_FOTS_FAILURE (fn-string-length fn-string-length-24 0) -EXPECTED_FOTS_FAILURE (fn-tokenize fn-tokenize-31 0) -EXPECTED_FOTS_FAILURE (fn-tokenize fn-tokenize-32 0) EXPECTED_FOTS_FAILURE (fn-unparsed-text fn-unparsed-text-038 0) EXPECTED_FOTS_FAILURE (fn-unparsed-text fn-unparsed-text-039 0) EXPECTED_FOTS_FAILURE (fn-unparsed-text fn-unparsed-text-042 0)
-- 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