Juan Zacarias has proposed merging lp:~zorba-coders/zorba/bug-950621 into 
lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)
  Juan Zacarias (juan457)
Related bugs:
  Bug #950621 in Zorba: "Eliminate parse-xml#2"
  https://bugs.launchpad.net/zorba/+bug/950621

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-950621/+merge/123655

Removed fn:parse-xml#2
Fix for bug 950621
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-950621/+merge/123655
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-09-10 18:50:57 +0000
+++ ChangeLog	2012-09-10 22:52:22 +0000
@@ -15,6 +15,7 @@
     predicate rewrite) to general flwor expressions.
 
 Bug Fixes/Other Changes:
+  * Fixed bug #950621 (Removed two-arg version of fn:parse-xml(); use XML module function xml:parse() instead)
   * Fixed bug #867227 (Improved error message for missing commas)
   * Fixed bug #1024033 and #1023170 (segfaults in parse-xml:parse())
   * Fixed bug #898792 (Dynamically computed strings can now be cast to xs:QName)

=== modified file 'src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp'
--- src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp	2012-09-10 18:50:57 +0000
+++ src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp	2012-09-10 22:52:22 +0000
@@ -74,34 +74,9 @@
       is = iss.get();
     }
 
-    // optional base URI argument
-    if (theChildren.size() == 2)
-    {
-      consumeNext(result, theChildren[1].getp(), planState);
-      ZORBA_ASSERT(result);
-
-      try {
-        lValidatedBaseUri = URI(result->getStringValue());
-      } catch (ZorbaException const& /* e */) {
-        throw XQUERY_EXCEPTION(
-          err::FODC0007,
-          ERROR_PARAMS( result->getStringValue() ),
-          ERROR_LOC( loc )
-        );
-      }
-
-      if (!lValidatedBaseUri.is_absolute()) {
-        throw XQUERY_EXCEPTION(
-          err::FODC0007,
-          ERROR_PARAMS( lValidatedBaseUri.toString() ),
-          ERROR_LOC( loc )
-        );
-      }
-
-      result->getStringValue2(baseUri);
-    } else {
-      baseUri = theSctx->get_base_uri();
-    }
+    
+    baseUri = theSctx->get_base_uri();
+    
 
     try {
       store::LoadProperties loadProps;

=== modified file 'src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml'
--- src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml	2012-09-10 18:50:57 +0000
+++ src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml	2012-09-10 22:52:22 +0000
@@ -27,12 +27,6 @@
         <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
         <zorba:output>document-node()</zorba:output>
       </zorba:signature>
-
-      <zorba:signature localname="parse-xml" prefix="fn" version="3.0">
-        <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
-        <zorba:param>xs:string</zorba:param> <!-- base uri -->
-        <zorba:output>node()*</zorba:output>
-      </zorba:signature>
       
       <zorba:methods>
         <zorba:accessesDynCtx returnValue="true"/>

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_14.xq'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_14.xq	2012-09-10 18:50:57 +0000
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_14.xq	1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:base-uri(fn:parse-xml("<a xml:base='foo'/>", "http://example.org/";)/a)

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.spec'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.spec	2012-09-10 18:50:57 +0000
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.spec	1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FODC0007

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.xq'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.xq	2012-09-10 18:50:57 +0000
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.xq	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-(: check for not absolute URI (FODC0007) :)
-fn:parse-xml("<a xml:base='foo'/>", "blub")

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.spec'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.spec	2012-09-10 18:50:57 +0000
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.spec	1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FODC0007

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.xq'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.xq	2012-09-10 18:50:57 +0000
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.xq	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-(: check for invalid URI (FODC0007) :)
-fn:parse-xml("<a xml:base='foo'/>", "http://";)

-- 
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