Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch 
into lp:zorba.

Commit message:
in XQuery 3.0, raise XQDY0054 instead of XQST0093

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/161503

in XQuery 3.0, raise XQDY0054 instead of XQST0093
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/161503
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-04-29 00:12:35 +0000
+++ src/compiler/translator/translator.cpp	2013-04-29 21:04:29 +0000
@@ -10939,7 +10939,12 @@
       for (; ite != end; ++ite)
       {
         if ((*ite).second == var_ns)
-          RAISE_ERROR(err::XQST0093, loc, ERROR_PARAMS(theModuleNamespace));
+        {
+          if (theSctx->xquery_version() == StaticContextConsts::xquery_version_1_0)
+            RAISE_ERROR(err::XQST0093, loc, ERROR_PARAMS(theModuleNamespace));
+          else
+            RAISE_ERROR(err::XQDY0054, loc, ERROR_PARAMS(qnameItem->getStringValue()));
+        }
       }
     }
 
@@ -11349,7 +11354,12 @@
       for (; ite != end; ++ite)
       {
         if ((*ite).second == fn_ns)
-          RAISE_ERROR(err::XQST0093, loc, ERROR_PARAMS(theModuleNamespace));
+        {
+          if (theSctx->xquery_version() == StaticContextConsts::xquery_version_1_0)
+            RAISE_ERROR(err::XQST0093, loc, ERROR_PARAMS(theModuleNamespace));
+          else
+            RAISE_ERROR(err::XQDY0054, loc, ERROR_PARAMS(qnameItem->getStringValue()));
+        }
       }
     }
     

=== modified file 'test/rbkt/Queries/zorba/modules/modules-28.spec'
--- test/rbkt/Queries/zorba/modules/modules-28.spec	2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/modules/modules-28.spec	2013-04-29 21:04:29 +0000
@@ -1,4 +1,4 @@
 Args: 
 -x 
 input-context=$RBKT_SRC_DIR/Queries/zorba/w3c/emptydoc.xml
-Error: http://www.w3.org/2005/xqt-errors:XQST0093
+Error: http://www.w3.org/2005/xqt-errors:XQDY0054

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

Reply via email to