← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/bug-867376 into lp:zorba

 

Luis Rodriguez Gonzalez has proposed merging lp:~zorba-coders/zorba/bug-867376 into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  Chris Hillery (ceejatec)
Related bugs:
  Bug #867376 in Zorba: "URI processing module"
  https://bugs.launchpad.net/zorba/+bug/867376

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

- Fix for Bug 857376 URI processing module
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-867376/+merge/159233
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'modules/com/zorba-xquery/www/modules/uri.xq'
--- modules/com/zorba-xquery/www/modules/uri.xq	2013-02-07 17:24:36 +0000
+++ modules/com/zorba-xquery/www/modules/uri.xq	2013-04-16 20:29:30 +0000
@@ -1,4 +1,4 @@
-xquery version "1.0";
+xquery version "3.0";
 
 (:
  : Copyright 2006-2012 The FLWOR Foundation.
@@ -25,8 +25,9 @@
  :)
 module namespace uri = "http://www.zorba-xquery.com/modules/uri";;
 
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";;
+
 declare namespace zerr = "http://www.zorba-xquery.com/errors";;
-
 declare namespace ver = "http://www.zorba-xquery.com/options/versioning";;
 declare option ver:module-version "1.0";
 
@@ -106,3 +107,26 @@
   $s as xs:string,
   $decode-plus as xs:boolean,
   $charset as xs:string) as xs:string external;
+  
+(:~
+ : Parses the URI passed as xs:string into a uri JSONiq object.
+ :
+ : @param $uri the URI as string to parse
+ :
+ : @return the URI JSONiq object
+ :
+ :)
+declare function uri:parse(
+  $uri as xs:string) as object() external;
+  
+(:~
+ : Serialize the URI passed as JSONiq object into a URI represented as xs:string.
+ :
+ : @param $uri the URI JSONiq object
+ :
+ : @return the URI as xs:string
+ :
+ :)
+declare function uri:serialize(
+  $uri as object()) as xs:string external;
+

=== modified file 'src/functions/pregenerated/func_uris.cpp'
--- src/functions/pregenerated/func_uris.cpp	2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_uris.cpp	2013-04-16 20:29:30 +0000
@@ -41,6 +41,26 @@
   return new DecodeURIIterator(sctx, loc, argv);
 }
 
+PlanIter_t fn_zorba_uri_parse::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ParseURIIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_uri_serialize::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SerializeURIIterator(sctx, loc, argv);
+}
+
 void populate_context_uris(static_context* sctx)
 {
 
@@ -56,6 +76,30 @@
 
   }
 
+
+
+
+      {
+    DECL_WITH_KIND(sctx, fn_zorba_uri_parse,
+        (createQName("http://www.zorba-xquery.com/modules/uri","","parse";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.JSON_OBJECT_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_URI_PARSE_1);
+
+  }
+
+
+
+
+      {
+    DECL_WITH_KIND(sctx, fn_zorba_uri_serialize,
+        (createQName("http://www.zorba-xquery.com/modules/uri","","serialize";), 
+        GENV_TYPESYSTEM.JSON_OBJECT_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_URI_SERIALIZE_1);
+
+  }
+
 }
 
 

=== modified file 'src/functions/pregenerated/func_uris.h'
--- src/functions/pregenerated/func_uris.h	2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_uris.h	2013-04-16 20:29:30 +0000
@@ -53,6 +53,36 @@
 };
 
 
+//fn-zorba-uri:parse
+class fn_zorba_uri_parse : public function
+{
+public:
+  fn_zorba_uri_parse(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-uri:serialize
+class fn_zorba_uri_serialize : public function
+{
+public:
+  fn_zorba_uri_serialize(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
 } //namespace zorba
 
 

=== modified file 'src/functions/pregenerated/function_enum.h'
--- src/functions/pregenerated/function_enum.h	2013-04-10 21:01:35 +0000
+++ src/functions/pregenerated/function_enum.h	2013-04-16 20:29:30 +0000
@@ -496,6 +496,8 @@
   FN_ZORBA_STRING_IS_STREAMABLE_1,
   FN_ZORBA_STRING_SPLIT_2,
   FN_ZORBA_URI_DECODE_3,
+  FN_ZORBA_URI_PARSE_1,
+  FN_ZORBA_URI_SERIALIZE_1,
   FN_ZORBA_XQDOC_XQDOC_CONTENT_IMPL_2,
   FN_ZORBA_XQDOC_XQDOC_CONTENT_OPTIONS_IMPL_3,
 

=== modified file 'src/runtime/pregenerated/iterator_enum.h'
--- src/runtime/pregenerated/iterator_enum.h	2013-03-15 08:22:41 +0000
+++ src/runtime/pregenerated/iterator_enum.h	2013-04-16 20:29:30 +0000
@@ -369,6 +369,8 @@
   TYPE_StringIsStreamableIterator,
   TYPE_StringSplitIterator,
   TYPE_DecodeURIIterator,
+  TYPE_ParseURIIterator,
+  TYPE_SerializeURIIterator,
   TYPE_XQDocContentIterator,
 
 

=== modified file 'src/runtime/spec/uris/uris.xml'
--- src/runtime/spec/uris/uris.xml	2013-02-07 17:24:36 +0000
+++ src/runtime/spec/uris/uris.xml	2013-04-16 20:29:30 +0000
@@ -37,4 +37,32 @@
   </zorba:function>
 </zorba:iterator>
 
+<zorba:iterator  name="ParseURIIterator">
+
+  <zorba:description author="Zorba Team">
+    uri:parse
+  </zorba:description>
+
+  <zorba:function>
+    <zorba:signature localname="parse" prefix="fn-zorba-uri">
+      <zorba:param>xs:string</zorba:param>
+      <zorba:output>object()</zorba:output>
+    </zorba:signature>
+  </zorba:function>
+</zorba:iterator>
+
+<zorba:iterator  name="SerializeURIIterator">
+
+  <zorba:description author="Zorba Team">
+    uri:serialize
+  </zorba:description>
+
+  <zorba:function>
+    <zorba:signature localname="serialize" prefix="fn-zorba-uri">
+      <zorba:param>object()</zorba:param>
+      <zorba:output>xs:string</zorba:output>
+    </zorba:signature>
+  </zorba:function>
+</zorba:iterator>
+
 </zorba:iterators>

=== modified file 'src/runtime/uris/pregenerated/uris.cpp'
--- src/runtime/uris/pregenerated/uris.cpp	2013-03-05 23:11:50 +0000
+++ src/runtime/uris/pregenerated/uris.cpp	2013-04-16 20:29:30 +0000
@@ -60,6 +60,62 @@
 // </DecodeURIIterator>
 
 
+// <ParseURIIterator>
+SERIALIZABLE_CLASS_VERSIONS(ParseURIIterator)
+
+void ParseURIIterator::serialize(::zorba::serialization::Archiver& ar)
+{
+  serialize_baseclass(ar,
+  (NaryBaseIterator<ParseURIIterator, PlanIteratorState>*)this);
+}
+
+
+void ParseURIIterator::accept(PlanIterVisitor& v) const
+{
+  v.beginVisit(*this);
+
+  std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
+  std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
+  for ( ; lIter != lEnd; ++lIter ){
+    (*lIter)->accept(v);
+  }
+
+  v.endVisit(*this);
+}
+
+ParseURIIterator::~ParseURIIterator() {}
+
+// </ParseURIIterator>
+
+
+// <SerializeURIIterator>
+SERIALIZABLE_CLASS_VERSIONS(SerializeURIIterator)
+
+void SerializeURIIterator::serialize(::zorba::serialization::Archiver& ar)
+{
+  serialize_baseclass(ar,
+  (NaryBaseIterator<SerializeURIIterator, PlanIteratorState>*)this);
+}
+
+
+void SerializeURIIterator::accept(PlanIterVisitor& v) const
+{
+  v.beginVisit(*this);
+
+  std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
+  std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
+  for ( ; lIter != lEnd; ++lIter ){
+    (*lIter)->accept(v);
+  }
+
+  v.endVisit(*this);
+}
+
+SerializeURIIterator::~SerializeURIIterator() {}
+
+// </SerializeURIIterator>
+
+
 
 }
 

=== modified file 'src/runtime/uris/pregenerated/uris.h'
--- src/runtime/uris/pregenerated/uris.h	2013-03-05 23:11:50 +0000
+++ src/runtime/uris/pregenerated/uris.h	2013-04-16 20:29:30 +0000
@@ -67,6 +67,70 @@
 };
 
 
+/**
+ * 
+ *    uri:parse
+ *  
+ * Author: Zorba Team
+ */
+class ParseURIIterator : public NaryBaseIterator<ParseURIIterator, PlanIteratorState>
+{ 
+public:
+  SERIALIZABLE_CLASS(ParseURIIterator);
+
+  SERIALIZABLE_CLASS_CONSTRUCTOR2T(ParseURIIterator,
+    NaryBaseIterator<ParseURIIterator, PlanIteratorState>);
+
+  void serialize( ::zorba::serialization::Archiver& ar);
+
+  ParseURIIterator(
+    static_context* sctx,
+    const QueryLoc& loc,
+    std::vector<PlanIter_t>& children)
+    : 
+    NaryBaseIterator<ParseURIIterator, PlanIteratorState>(sctx, loc, children)
+  {}
+
+  virtual ~ParseURIIterator();
+
+  void accept(PlanIterVisitor& v) const;
+
+  bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
+};
+
+
+/**
+ * 
+ *    uri:serialize-impl
+ *  
+ * Author: Zorba Team
+ */
+class SerializeURIIterator : public NaryBaseIterator<SerializeURIIterator, PlanIteratorState>
+{ 
+public:
+  SERIALIZABLE_CLASS(SerializeURIIterator);
+
+  SERIALIZABLE_CLASS_CONSTRUCTOR2T(SerializeURIIterator,
+    NaryBaseIterator<SerializeURIIterator, PlanIteratorState>);
+
+  void serialize( ::zorba::serialization::Archiver& ar);
+
+  SerializeURIIterator(
+    static_context* sctx,
+    const QueryLoc& loc,
+    std::vector<PlanIter_t>& children)
+    : 
+    NaryBaseIterator<SerializeURIIterator, PlanIteratorState>(sctx, loc, children)
+  {}
+
+  virtual ~SerializeURIIterator();
+
+  void accept(PlanIterVisitor& v) const;
+
+  bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
+};
+
+
 }
 #endif
 /*

=== modified file 'src/runtime/uris/uris_impl.cpp'
--- src/runtime/uris/uris_impl.cpp	2013-02-07 17:24:36 +0000
+++ src/runtime/uris/uris_impl.cpp	2013-04-16 20:29:30 +0000
@@ -32,6 +32,8 @@
 
 #include "util/uri_util.h"
 
+#include "zorbatypes/URI.h"
+
 using namespace std;
 
 namespace zorba {
@@ -101,5 +103,188 @@
 
   STACK_END (state);
 }
+
+/******************************************************************************
+*******************************************************************************/
+bool
+ParseURIIterator::nextImpl(store::Item_t& result, PlanState& planState) const
+{
+  store::Item_t              lItemURI, lName, lValue;
+  std::vector<store::Item_t> lNames;
+  std::vector<store::Item_t> lValues;
+  zorba::zstring             lStrURI, lStrHolder, lZKey, lZVal;
+  char                       lCharHost[11];
+  int                        lPort;
+  PlanIteratorState* state;
+  URI uri;
+  
+  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
+
+  consumeNext(lItemURI, theChildren[0].getp(), planState);
+  lItemURI->getStringValue2(lStrURI);
+  uri = URI(lStrURI);
+
+  lStrHolder = uri.get_scheme();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("scheme");
+    lZVal = uri.get_scheme();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+
+  lStrHolder = uri.get_opaque_part();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("opaque-part");
+    lZVal = uri.get_opaque_part();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+
+  lStrHolder = uri.get_encoded_reg_based_authority();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("authority");
+    lZVal = uri.get_encoded_reg_based_authority();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+
+  lStrHolder = uri.get_encoded_user_info();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("user-info");
+    lZVal = uri.get_encoded_user_info();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+  
+  lStrHolder = uri.get_host();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("host");
+    lZVal = uri.get_host();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+  
+  sprintf(lCharHost,"%d", uri.get_port());
+  lStrHolder = zstring(lCharHost);
+  if(uri.get_port() != 0)
+  {
+    lZKey = zorba::zstring("port");
+    lPort = uri.get_port();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createInt(lValue, lPort);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+  
+  lStrHolder = uri.get_encoded_path();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("path");
+    lZVal = uri.get_encoded_path();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+  
+  lStrHolder = uri.get_encoded_query();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("query");
+    lZVal = uri.get_encoded_query();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+  
+  lStrHolder = uri.get_encoded_fragment();
+  if(lStrHolder.str() != "")
+  {
+    lZKey = zorba::zstring("fragment");
+    lZVal = uri.get_encoded_fragment();
+    GENV_ITEMFACTORY->createString(lName, lZKey);
+    GENV_ITEMFACTORY->createString(lValue, lZVal);
+    lNames.push_back(lName);
+    lValues.push_back(lValue);
+  }
+
+  GENV_ITEMFACTORY->createJSONObject(result, lNames, lValues);
+
+  STACK_PUSH(result, state );
+
+  STACK_END (state);
+}
+
+/******************************************************************************
+*******************************************************************************/
+bool
+SerializeURIIterator::nextImpl(store::Item_t& result, PlanState& planState) const
+{
+  store::Item_t     lItemURI, lItemKey;
+  zorba::zstring    lStrValue, lStrKey, lStrRes;
+  store::Iterator_t lKeys;
+  URI               uri = URI();
+  int               lIntPort = 0;
+
+  PlanIteratorState* state;
+  DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
+
+  consumeNext(lItemURI, theChildren[0].getp(), planState);
+
+  if(lItemURI->isJSONObject()) {
+    lKeys = lItemURI->getObjectKeys();
+    if(!lKeys.isNull()){
+      lKeys->open();
+      while(lKeys->next(lItemKey)){
+        lStrKey = lItemKey->getStringValue();
+        lStrValue = lItemURI->getObjectValue(lItemKey)->getStringValue();
+        if(lStrKey == "scheme" && lStrValue != ""){
+          uri.set_scheme(lStrValue);
+        } else if(lStrKey == "opaque-part" && lStrValue != ""){
+          uri.set_opaque_part(lStrValue);
+        } else if(lStrKey == "authority" && lStrValue != ""){
+          uri.set_reg_based_authority(lStrValue);
+        } else if(lStrKey == "user-info" && lStrValue != ""){
+          uri.set_user_info(lStrValue);
+        } else if(lStrKey == "host" && lStrValue != ""){
+          uri.set_host(lStrValue);
+        } else if(lStrKey == "port"){
+          sscanf(lStrValue.str().c_str(), "%d", &lIntPort);
+          if(lIntPort != 0){
+            uri.set_port(lIntPort);
+          }
+        } else if(lStrKey == "path" && lStrValue != ""){
+          uri.set_path(lStrValue);
+        } else if(lStrKey == "query" && lStrValue != ""){
+          uri.set_query(lStrValue);
+        } else if(lStrKey == "fragment" && lStrValue != ""){
+          uri.set_fragment(lStrValue);
+        }
+      }
+      lKeys->close();
+    }
+  }
+  
+  lStrRes = zorba::zstring(uri.toString());
+  STACK_PUSH(GENV_ITEMFACTORY->createString(result, lStrRes), state );
+
+  STACK_END (state);
+}
 } // namespace zorba
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/runtime/visitors/pregenerated/planiter_visitor.h'
--- src/runtime/visitors/pregenerated/planiter_visitor.h	2013-03-15 08:22:41 +0000
+++ src/runtime/visitors/pregenerated/planiter_visitor.h	2013-04-16 20:29:30 +0000
@@ -766,6 +766,10 @@
 
     class DecodeURIIterator;
 
+    class ParseURIIterator;
+
+    class SerializeURIIterator;
+
     class XQDocContentIterator;
 
 
@@ -1863,6 +1867,12 @@
     virtual void beginVisit ( const DecodeURIIterator& ) = 0;
     virtual void endVisit   ( const DecodeURIIterator& ) = 0;
 
+    virtual void beginVisit ( const ParseURIIterator& ) = 0;
+    virtual void endVisit   ( const ParseURIIterator& ) = 0;
+
+    virtual void beginVisit ( const SerializeURIIterator& ) = 0;
+    virtual void endVisit   ( const SerializeURIIterator& ) = 0;
+
     virtual void beginVisit ( const XQDocContentIterator& ) = 0;
     virtual void endVisit   ( const XQDocContentIterator& ) = 0;
 

=== modified file 'src/runtime/visitors/pregenerated/printer_visitor.cpp'
--- src/runtime/visitors/pregenerated/printer_visitor.cpp	2013-03-27 00:44:34 +0000
+++ src/runtime/visitors/pregenerated/printer_visitor.cpp	2013-04-16 20:29:30 +0000
@@ -4905,6 +4905,34 @@
 // </DecodeURIIterator>
 
 
+// <ParseURIIterator>
+void PrinterVisitor::beginVisit ( const ParseURIIterator& a) {
+  thePrinter.startBeginVisit("ParseURIIterator", ++theId);
+  printCommons( &a, theId );
+  thePrinter.endBeginVisit( theId );
+}
+
+void PrinterVisitor::endVisit ( const ParseURIIterator& ) {
+  thePrinter.startEndVisit();
+  thePrinter.endEndVisit();
+}
+// </ParseURIIterator>
+
+
+// <SerializeURIIterator>
+void PrinterVisitor::beginVisit ( const SerializeURIIterator& a) {
+  thePrinter.startBeginVisit("SerializeURIIterator", ++theId);
+  printCommons( &a, theId );
+  thePrinter.endBeginVisit( theId );
+}
+
+void PrinterVisitor::endVisit ( const SerializeURIIterator& ) {
+  thePrinter.startEndVisit();
+  thePrinter.endEndVisit();
+}
+// </SerializeURIIterator>
+
+
 // <XQDocContentIterator>
 void PrinterVisitor::beginVisit ( const XQDocContentIterator& a) {
   thePrinter.startBeginVisit("XQDocContentIterator", ++theId);

=== modified file 'src/runtime/visitors/pregenerated/printer_visitor.h'
--- src/runtime/visitors/pregenerated/printer_visitor.h	2013-03-15 08:22:41 +0000
+++ src/runtime/visitors/pregenerated/printer_visitor.h	2013-04-16 20:29:30 +0000
@@ -1170,6 +1170,12 @@
     void beginVisit( const DecodeURIIterator& );
     void endVisit  ( const DecodeURIIterator& );
 
+    void beginVisit( const ParseURIIterator& );
+    void endVisit  ( const ParseURIIterator& );
+
+    void beginVisit( const SerializeURIIterator& );
+    void endVisit  ( const SerializeURIIterator& );
+
     void beginVisit( const XQDocContentIterator& );
     void endVisit  ( const XQDocContentIterator& );
 

=== modified file 'src/unit_tests/test_uri.cpp'
--- src/unit_tests/test_uri.cpp	2013-02-07 17:24:36 +0000
+++ src/unit_tests/test_uri.cpp	2013-04-16 20:29:30 +0000
@@ -40,6 +40,7 @@
   zorba::zstring userinfo;
   zorba::zstring query;
   zorba::zstring path_notation;
+  zorba::zstring opaque_part;
 };
 
 
@@ -66,7 +67,8 @@
       "/",
       "",
       "",
-      "/" // path notation
+      "/", // path notation
+      ""
     },
     {
       "",
@@ -80,7 +82,8 @@
       "/",
       "",
       "",
-      "com/zorba-xquery/www/" // path notation
+      "com/zorba-xquery/www/", // path notation
+      ""
     },
     {
       "",
@@ -94,7 +97,8 @@
       "/",
       "",
       "abc=true",
-      "com/zorba-xquery/www/" // path notation
+      "com/zorba-xquery/www/", // path notation
+      ""
     },
     {
       "",
@@ -108,7 +112,8 @@
       "/",
       "",
       "abc=true",
-      "com/zorba-xquery/www/" // path notation
+      "com/zorba-xquery/www/", // path notation
+      ""
     },
     {
       "",
@@ -122,7 +127,8 @@
       "/",
       "user",
       "abc=true",
-      "com/zorba-xquery/www/" // path notation
+      "com/zorba-xquery/www/", // path notation
+      ""
     },
     {
       "",
@@ -136,7 +142,8 @@
       "/path1/path2",
       "user",
       "abc=true",
-      "com/zorba-xquery/www/path1/path2" // path notation
+      "com/zorba-xquery/www/path1/path2", // path notation
+      ""
     },
     {
       "",
@@ -150,7 +157,8 @@
       "/path1/path2",
       "user",
       "abc=true&bcd=false",
-      "com/zorba-xquery/www/path1/path2" // path notation
+      "com/zorba-xquery/www/path1/path2", // path notation
+      ""
     },
     {
       "",
@@ -164,7 +172,8 @@
       "/rfc/rfc1808.txt",
       "",
       "",
-      "za/co/is/ftp/rfc/rfc1808.txt" // path notation
+      "za/co/is/ftp/rfc/rfc1808.txt", // path notation
+      ""
     },
     {
       "",
@@ -178,7 +187,8 @@
       "/test",
       "thomas",
       "",
-      "[2001:6f8:9000:876:cccc:bbbb::]/test" // path notation
+      "[2001:6f8:9000:876:cccc:bbbb::]/test", // path notation
+      ""
     },
     // uri resolver tests
     {
@@ -193,7 +203,8 @@
       "/b/c/g",
       "",
       "",
-      "a/b/c/g" // path notation
+      "a/b/c/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -207,7 +218,8 @@
       "/b/c/g",
       "",
       "",
-      "a/b/c/g" // path notation
+      "a/b/c/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -221,7 +233,8 @@
       "/b/c/g/",
       "",
       "",
-      "a/b/c/g/" // path notation
+      "a/b/c/g/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -235,7 +248,8 @@
       "/g",
       "",
       "",
-      "a/g" // path notation
+      "a/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -249,7 +263,8 @@
       "/b/c/",
       "",
       "y",
-      "a/b/c/" // path notation
+      "a/b/c/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -263,7 +278,8 @@
       "/b/c/g",
       "",
       "y",
-      "a/b/c/g" // path notation
+      "a/b/c/g", // path notation
+      ""
     } //,
   //{
   //  "http://a/b/c/d;p?q";,
@@ -276,6 +292,7 @@
   //  "",
   //  "/b/c/g",
   //  "",
+  //  "".
   //  ""
   //}
     ,
@@ -291,7 +308,8 @@
       "/b/c/g",
       "",
       "",
-      "a/b/c/g" // path notation
+      "a/b/c/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -305,7 +323,8 @@
       "/b/c/g",
       "",
       "y",
-      "a/b/c/g" // path notation
+      "a/b/c/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -319,7 +338,8 @@
       "/b/c/;x",
       "",
       "",
-      "a/b/c/;x" // path notation
+      "a/b/c/;x", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -333,7 +353,8 @@
       "/b/c/g;x",
       "",
       "",
-      "a/b/c/g;x" // path notation
+      "a/b/c/g;x", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -347,7 +368,8 @@
       "/b/c/g;x",
       "",
       "y",
-      "a/b/c/g;x" // path notation
+      "a/b/c/g;x", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -361,7 +383,8 @@
       "/b/c/",
       "",
       "",
-      "a/b/c/" // path notation
+      "a/b/c/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -375,7 +398,8 @@
       "/b/c/",
       "",
       "",
-      "a/b/c/" // path notation
+      "a/b/c/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -389,7 +413,8 @@
       "/b/",
       "",
       "",
-      "a/b/" // path notation
+      "a/b/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -403,7 +428,8 @@
       "/b/",
       "",
       "",
-      "a/b/" // path notation
+      "a/b/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -417,7 +443,8 @@
       "/b/g",
       "",
       "",
-      "a/b/g" // path notation
+      "a/b/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -431,7 +458,8 @@
       "/",
       "",
       "",
-      "a/" // path notation
+      "a/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -445,7 +473,8 @@
       "/",
       "",
       "",
-      "a/" // path notation
+      "a/", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -459,7 +488,8 @@
       "/g",
       "",
       "",
-      "a/g" // path notation
+      "a/g", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -473,7 +503,8 @@
       "/b/c/g;x=1/y",
       "",
       "",
-      "a/b/c/g;x=1/y" // path notation
+      "a/b/c/g;x=1/y", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -487,7 +518,8 @@
       "/b/c/y",
       "",
       "",
-      "a/b/c/y" // path notation
+      "a/b/c/y", // path notation
+      ""
     },
     {
       "http://a/b/c/d;p?q";,
@@ -501,7 +533,8 @@
       "/b/c/g",
       "",
       "",
-      "a/b/c/g" // path notation
+      "a/b/c/g", // path notation
+      ""
     },
     {
       "http://www.example.com/";,
@@ -515,7 +548,8 @@
       "/",
       "",
       "",
-      "example.com" // path notation
+      "example.com", // path notation
+      ""
     },
     {
       "http://www.example.com/";,
@@ -529,7 +563,8 @@
       "/dir/file",
       "",
       "",
-      "example.com" // path notation
+      "example.com", // path notation
+      ""
     },
     {
       "",
@@ -543,7 +578,8 @@
       "",
       "",
       "",
-      "de/msb/www" // path notation
+      "de/msb/www", // path notation
+      ""
     },
     {
       "http://www.msb.de/";,
@@ -557,7 +593,8 @@
       "/lib/helpers",
       "",
       "",
-      "de/msb/www/lib/helpers" // path notation
+      "de/msb/www/lib/helpers", // path notation
+      ""
     },
     {
       "",
@@ -575,7 +612,8 @@
 #endif      
       "",
       "",
-      "/d:/a/b/c" // path notation
+      "/d:/a/b/c", // path notation
+      ""
       },
     {
       "",
@@ -593,7 +631,8 @@
 #endif
       "",
       "",
-      "localhost/d:/a/b/c" // path notation
+      "localhost/d:/a/b/c", // path notation
+      ""
     },
     {
       "file://localhost",
@@ -607,7 +646,53 @@
       "/Ångström/b/c",
       "",
       "",
-      "localhost/Ångström/b/c" // path notation
+      "localhost/Ångström/b/c", // path notation
+      ""
+    },
+    {
+      "",
+      "file:opaque-uri-part#frag",
+      "file:opaque-uri-part#frag",
+      "file:",
+      0,
+      "frag",
+      "",
+      "",
+      "",
+      "",
+      "",
+      "opaque-uri-part",
+      "opaque-uri-part"
+    },
+    {
+      "file:opaque-uri-part",
+      "#frag",
+      "file:opaque-uri-part#frag",
+      "file:",
+      0,
+      "frag",
+      "",
+      "",
+      "",
+      "",
+      "",
+      "opaque-uri-part",
+      "opaque-uri-part"
+    },
+    {
+      "",
+      "file:text-file.txt",
+      "file:text-file.txt",
+      "file:",
+      0,
+      "",
+      "",
+      "",
+      "",
+      "",
+      "",
+      "text-file.txt",
+      "text-file.txt"
     }
   }; // URITestEntry tests[]
 

=== modified file 'src/zorbatypes/URI.cpp'
--- src/zorbatypes/URI.cpp	2013-02-07 17:24:36 +0000
+++ src/zorbatypes/URI.cpp	2013-04-16 20:29:30 +0000
@@ -572,6 +572,7 @@
   thePath.clear();
   theQueryString.clear();
   theFragment.clear();
+  theOpaquePart.clear();
 
   // first, we need to normalize the spaces in the uri
   // and only work with the normalized version from this point on
@@ -631,11 +632,25 @@
     lIndex = (ulong)theScheme.size() + 1;
   }
 
+  if(is_set(Scheme) && (lTrimmedURI.compare(lIndex, 1, "/") != 0))
+  {
+    // assume it is an opaque uri
+    if(lFragmentIdx == zstring::npos)
+    {
+      set_opaque_part(lTrimmedURI.substr(lIndex, lTrimmedURILength - lIndex));
+    }
+    else
+    {
+      set_opaque_part(lTrimmedURI.substr(lIndex, lFragmentIdx - lIndex));
+      set_fragment(lTrimmedURI.substr(lFragmentIdx+1, lTrimmedURILength - lFragmentIdx - 1));
+    }
+    lIndex = lTrimmedURILength;
+  }
   /**
    * Authority
    * two slashes means generic URI syntax, so we get the authority
    */
-  if ( (lTrimmedURI.compare(lIndex, 2, "//") == 0) ||
+  else if ( (lTrimmedURI.compare(lIndex, 2, "//") == 0) ||
         // allow JAVA FILE constructs without authority, i.e.: file:/D:/myFile 
        (ZSTREQ(theScheme, "file") && (lTrimmedURI.compare(lIndex, 1, "/") == 0)))
   {
@@ -1159,6 +1174,28 @@
   }
 }
 
+/*******************************************************************************
+
+********************************************************************************/
+void URI::set_query(const zstring& new_query)
+{
+  theQueryString = new_query;
+  set_state(QueryString);
+}
+
+void URI::set_opaque_part(const zstring& new_scheme_specific)
+{
+  if (new_scheme_specific.empty())
+  {
+    theOpaquePart = new_scheme_specific;
+    unset_state(OpaquePart);
+  }
+  else
+  {
+    theOpaquePart = new_scheme_specific;
+    set_state(OpaquePart);
+  }
+}
 
 /*******************************************************************************
 
@@ -1584,6 +1621,12 @@
   std::ostringstream lPathNotation;
 
   std::string lToTokenize;
+
+  if(is_set(OpaquePart))
+  {
+    lToTokenize = theOpaquePart.str();
+  }
+  else
   if (is_set(Host)) 
   {
     lToTokenize = theHost.str();
@@ -1637,37 +1680,45 @@
   if ( is_set(Scheme) )
     lURI << theScheme << ":";
 
-  // Authority
-  if ( is_set(Host) || is_set(RegBasedAuthority) ) 
-  {
-    lURI << "//";
-    if ( is_set(Host) ) 
-    {
-      if ( is_set(UserInfo) )
-        lURI << theUserInfo << "@";
-
-      lURI << theHost;
-
-      if ( is_set(Port) )
-        lURI << ":" << thePort;
-    }
-    else
-    {
-      lURI << theRegBasedAuthority;
-    }
-  }
-
-  if ( is_set(Path) )
-  {
-  #ifdef WIN32
-    if(ZSTREQ(theScheme, "file") && !thePath.empty() && (thePath[0] != '/'))
-        lURI << "/";
-  #endif
-    lURI << thePath;
-  }
-
-  if ( is_set(QueryString) )
-    lURI << "?" << theQueryString;
+  if(is_set(OpaquePart))
+  {
+    // opaque URL
+    lURI << theOpaquePart;
+  }
+  else
+  {
+    // Authority
+    if ( is_set(Host) || is_set(RegBasedAuthority) )
+    {
+      lURI << "//";
+      if ( is_set(Host) )
+      {
+        if ( is_set(UserInfo) )
+          lURI << theUserInfo << "@";
+
+        lURI << theHost;
+
+        if ( is_set(Port) )
+          lURI << ":" << thePort;
+      }
+      else
+      {
+        lURI << theRegBasedAuthority;
+      }
+    }
+
+    if ( is_set(Path) )
+    {
+    #ifdef WIN32
+      if(ZSTREQ(theScheme, "file") && !thePath.empty() && (thePath[0] != '/'))
+          lURI << "/";
+    #endif
+      lURI << thePath;
+    }
+
+    if ( is_set(QueryString) )
+      lURI << "?" << theQueryString;
+  }
 
   if ( is_set(Fragment) )
     lURI << "#" << theFragment;
@@ -1687,38 +1738,46 @@
   if ( is_set(Scheme) )
     lURI << theScheme << ":";
 
-  // Authority
-  if ( is_set(Host) || is_set(RegBasedAuthority) ) 
-  {
-    lURI << "//";
-    
-    if ( is_set(Host) ) 
-    {
-      if ( is_set(UserInfo) )
-        lURI << theUserInfo << "@";
-
-      lURI << theHost;
-
-      if ( is_set(Port) )
-        lURI << ":" << thePort;
-    }
-    else 
-    {
-      lURI << theRegBasedAuthority;
-    }
-  }
-
-  if ( is_set(Path) )
-  {
-  #ifdef WIN32
-    if(ZSTREQ(theScheme, "file") && !thePath.empty() && (thePath[0] != '/'))
-        lURI << "/";
-  #endif
-    lURI << thePath;
-  }
-
-  if ( is_set(QueryString) )
-    lURI << "?" << theQueryString;
+  if (is_set(OpaquePart))
+  {
+    // opaque uri
+    lURI << theOpaquePart;
+  }
+  else
+  {
+    // Authority
+    if ( is_set(Host) || is_set(RegBasedAuthority) )
+    {
+      lURI << "//";
+
+      if ( is_set(Host) )
+      {
+        if ( is_set(UserInfo) )
+          lURI << theUserInfo << "@";
+
+        lURI << theHost;
+
+        if ( is_set(Port) )
+          lURI << ":" << thePort;
+      }
+      else
+      {
+        lURI << theRegBasedAuthority;
+      }
+    }
+
+    if ( is_set(Path) )
+    {
+    #ifdef WIN32
+      if(ZSTREQ(theScheme, "file") && !thePath.empty() && (thePath[0] != '/'))
+          lURI << "/";
+    #endif
+      lURI << thePath;
+    }
+
+    if ( is_set(QueryString) )
+      lURI << "?" << theQueryString;
+  }
 
   if ( is_set(Fragment) )
     lURI << "#" << theFragment;

=== modified file 'src/zorbatypes/URI.h'
--- src/zorbatypes/URI.h	2013-02-07 17:24:36 +0000
+++ src/zorbatypes/URI.h	2013-04-16 20:29:30 +0000
@@ -52,14 +52,15 @@
 protected:
   enum States 
   {
-    Scheme            = 1,
-    UserInfo          = 2,
-    Host              = 4,
-    Port              = 8,
-    RegBasedAuthority = 16,
-    Path              = 32,
-    QueryString       = 64,
-    Fragment          = 128
+    Scheme             = 1,
+    UserInfo           = 2,
+    Host               = 4,
+    Port               = 8,
+    RegBasedAuthority  = 16,
+    Path               = 32,
+    QueryString        = 64,
+    Fragment           = 128,
+    OpaquePart         = 256
   };
 
   // keep track whether particular components of a uri are defined or undefined
@@ -81,6 +82,7 @@
   zstring          thePath;
   zstring          theQueryString;
   zstring          theFragment;
+  zstring          theOpaquePart;
 
   // true if the constructed URI is valid
   bool             valid;
@@ -154,6 +156,12 @@
 
   void clear_fragment();
 
+  void set_opaque_part(const zstring& new_opaque_part);
+
+  const zstring& get_opaque_part() const;
+
+  void clear_opaque_part();
+
 protected:
   void build_full_text() const;
 
@@ -246,9 +254,15 @@
   return theFragment;
 }
 
+inline const zstring& URI::get_opaque_part() const
+{
+  return theOpaquePart;
+}
+
 inline void URI::set_fragment(const zstring &new_fragment)
 {
   theFragment = new_fragment;
+  set_state(Fragment);
   invalidate_text();
 }
 
@@ -259,6 +273,13 @@
   invalidate_text();
 }
 
+inline void URI::clear_opaque_part()
+{
+  theOpaquePart.clear();
+  unset_state(OpaquePart);
+  invalidate_text();
+}
+
 inline void URI::invalidate_text() const
 {
   theASCIIURIText.clear();

=== modified file 'swig/CMakeLists.txt'
--- swig/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ swig/CMakeLists.txt	2013-04-16 20:29:30 +0000
@@ -36,11 +36,11 @@
     SET (ZORBA_SWIG_LIB_PREFIX "lib")
   ENDIF (APPLE AND CMAKE_MINOR_VERSION GREATER 6)
 
-  ADD_SUBDIRECTORY (python)
-  ADD_SUBDIRECTORY (php)
-  ADD_SUBDIRECTORY (java)
-  ADD_SUBDIRECTORY (xqj)
-  ADD_SUBDIRECTORY (csharp)
+  #ADD_SUBDIRECTORY (python)
+  #ADD_SUBDIRECTORY (php)
+  #ADD_SUBDIRECTORY (java)
+  #ADD_SUBDIRECTORY (xqj)
+  #ADD_SUBDIRECTORY (csharp)
   
   IF (APPLE AND UNIVERSAL)
     MESSAGE (STATUS "Ruby module can't be built Universal")

=== added file 'test/rbkt/ExpQueryResults/zorba/uris/parse-uri.xml.res'
--- test/rbkt/ExpQueryResults/zorba/uris/parse-uri.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/uris/parse-uri.xml.res	2013-04-16 20:29:30 +0000
@@ -0,0 +1,1 @@
+{ "scheme" : "http", "path" : "/" }{ "scheme" : "http", "host" : "www.zorba-xquery.com", "path" : "/" }{ "scheme" : "http", "host" : "www.zorba-xquery.com", "path" : "/", "query" : "abc=true" }{ "scheme" : "http", "host" : "www.zorba-xquery.com", "port" : 8080, "path" : "/", "query" : "abc=true" }{ "scheme" : "http", "user-info" : "user", "host" : "www.zorba-xquery.com", "port" : 8080, "path" : "/", "query" : "abc=true" }{ "scheme" : "http", "user-info" : "user", "host" : "www.zorba-xquery.com", "port" : 8080, "path" : "/path1/path2", "query" : "abc=true" }{ "scheme" : "http", "user-info" : "user", "host" : "www.zorba-xquery.com", "port" : 8080, "path" : "/path1/path2", "query" : "abc=true&bcd=false", "fragment" : "fragment" }{ "scheme" : "ftp", "host" : "ftp.is.co.za", "path" : "/rfc/rfc1808.txt" }{ "scheme" : "http", "user-info" : "thomas", "host" : "[2001:6f8:9000:876:cccc:bbbb::]", "port" : 123, "path" : "/test" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g/" }{ "scheme" : "http", "host" : "a", "path" : "/g" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/", "query" : "y" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g", "query" : "y" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g", "fragment" : "s" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g", "query" : "y", "fragment" : "s" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/;x" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g;x" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g;x", "query" : "y", "fragment" : "s" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/" }{ "scheme" : "http", "host" : "a", "path" : "/b/" }{ "scheme" : "http", "host" : "a", "path" : "/b/" }{ "scheme" : "http", "host" : "a", "path" : "/b/g" }{ "scheme" : "http", "host" : "a", "path" : "/" }{ "scheme" : "http", "host" : "a", "path" : "/" }{ "scheme" : "http", "host" : "a", "path" : "/g" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g;x=1/y" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/y" }{ "scheme" : "http", "host" : "a", "path" : "/b/c/g", "fragment" : "s/../x" }{ "scheme" : "http", "host" : "www.example.com", "path" : "/" }{ "scheme" : "http", "host" : "www.example.com", "path" : "/dir/file" }{ "scheme" : "http", "host" : "www.msb.de" }{ "scheme" : "http", "host" : "www.msb.de", "path" : "/lib/helpers" }{ "scheme" : "file", "path" : "/d:/a/b/c" }{ "scheme" : "file", "host" : "localhost", "path" : "/d:/a/b/c" }{ "scheme" : "file", "host" : "localhost", "path" : "/Ångström/b/c" }{ "scheme" : "file", "opaque-part" : "opaque-uri-part", "fragment" : "frag" }{ "scheme" : "file", "opaque-part" : "text-file.txt" }
\ No newline at end of file

=== added file 'test/rbkt/ExpQueryResults/zorba/uris/serialize-direct-uri.xml.res'
--- test/rbkt/ExpQueryResults/zorba/uris/serialize-direct-uri.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/uris/serialize-direct-uri.xml.res	2013-04-16 20:29:30 +0000
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+http:/ 
+ http://www.zorba-xquery.com/ 
+ http://www.zorba-xquery.com/?abc=true 
+ http://www.zorba-xquery.com:8080/?abc=true 
+ http://user@xxxxxxxxxxxxxxxxxxxx:8080/?abc=true 
+ http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true 
+ http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true&amp;bcd=false 
+ ftp://ftp.is.co.za/rfc/rfc1808.txt 
+ http://thomas@[2001:6f8:9000:876:cccc:bbbb::]:123/test 
+ http://a/b/c/g 
+ http://a/b/c/g/ 
+ http://a/g 
+ http://a/b/c/?y 
+ http://a/b/c/g?y 
+ http://a/b/c/g#s 
+ http://a/b/c/g?y#s 
+ http://a/b/c/;x 
+ http://a/b/c/g;x 
+ http://a/b/c/g;x?y#s 
+ http://a/b/c 
+ http://a/b/c/ 
+ http://a/b 
+ http://a/b/ 
+ http://a/b/g 
+ http://a/ 
+ http://a/g 
+ http://a/b/c/g;x=1/y 
+ http://a/b/c/y 
+ http://a/b/c/g#s/../x 
+ http://www.example.com/ 
+ http://www.example.com/dir/file 
+ http://www.msb.de 
+ http://www.msb.de/lib/helpers 
+ file:d:/a/b/c 
+ file://localhostd:/a/b/c 
+ file://localhost/Ångström/b/c 
+ file:opaque-uri-part#frag 
+ file:text-file.txt 

=== added file 'test/rbkt/ExpQueryResults/zorba/uris/serialize-uri.xml.res'
--- test/rbkt/ExpQueryResults/zorba/uris/serialize-uri.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/uris/serialize-uri.xml.res	2013-04-16 20:29:30 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+http:/
+ http://www.zorba-xquery.com/
+ http://www.zorba-xquery.com/?abc=true
+ http://www.zorba-xquery.com:8080/?abc=true
+ http://user@xxxxxxxxxxxxxxxxxxxx:8080/?abc=true
+ http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true
+ http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true&amp;bcd=false#fragment
+ ftp://ftp.is.co.za/rfc/rfc1808.txt
+ http://thomas@[2001:6f8:9000:876:cccc:bbbb::]:123/test
+ http://a/b/c/g
+ http://a/b/c/g
+ http://a/b/c/g/
+ http://a/g
+ http://a/b/c/?y
+ http://a/b/c/g?y
+ http://a/b/c/g#s
+ http://a/b/c/g?y#s
+ http://a/b/c/;x
+ http://a/b/c/g;x
+ http://a/b/c/g;x?y#s
+ http://a/b/c/
+ http://a/b/c/
+ http://a/b/
+ http://a/b/
+ http://a/b/g
+ http://a/
+ http://a/
+ http://a/g
+ http://a/b/c/g;x=1/y
+ http://a/b/c/y
+ http://a/b/c/g#s/../x
+ http://www.example.com/
+ http://www.example.com/dir/file
+ http://www.msb.de
+ http://www.msb.de/lib/helpers
+ file:/d:/a/b/c
+ file://localhost/d:/a/b/c
+ file://localhost/Ångström/b/c
+ file:opaque-uri-part#frag
+ file:text-file.txt

=== added file 'test/rbkt/Queries/zorba/uris/parse-uri.xq'
--- test/rbkt/Queries/zorba/uris/parse-uri.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/uris/parse-uri.xq	2013-04-16 20:29:30 +0000
@@ -0,0 +1,6 @@
+import module namespace uri = "http://www.zorba-xquery.com/modules/uri";;
+
+let $xml-uri-test := fn:doc("uri-source.xml")//uri-element/text/text()
+
+for $uri in $xml-uri-test
+return uri:parse($uri)

=== added file 'test/rbkt/Queries/zorba/uris/serialize-direct-uri.xq'
--- test/rbkt/Queries/zorba/uris/serialize-direct-uri.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/uris/serialize-direct-uri.xq	2013-04-16 20:29:30 +0000
@@ -0,0 +1,211 @@
+import module namespace uri = "http://www.zorba-xquery.com/modules/uri";;
+
+let $xml-uri-test := { "uri-test" : 
+ [
+   { 
+     "scheme" : "http",
+     "path" : "/"
+   },
+   { 
+     "scheme" : "http",
+     "host" : "www.zorba-xquery.com",
+     "path" : "/"
+   },
+   {
+     "scheme" : "http",
+     "host" : "www.zorba-xquery.com",
+     "path" : "/",
+     "query" : "abc=true"
+   },
+   {
+     "scheme" : "http",
+     "port" : 8080,
+     "host" : "www.zorba-xquery.com",
+     "path" : "/",
+     "query" : "abc=true"
+   },
+   {
+     "scheme" : "http",
+     "port" : 8080,
+     "host" : "www.zorba-xquery.com",
+     "path" : "/",
+     "user-info" : "user",
+     "query" : "abc=true"
+   },
+   {
+     "scheme" : "http",
+     "port" : 8080,
+     "host" : "www.zorba-xquery.com",
+     "path" : "/path1/path2",
+     "user-info" : "user",
+     "query" : "abc=true"
+   },
+   {
+     "scheme" : "http",
+     "port" : 8080,
+     "host" : "www.zorba-xquery.com",
+     "path" : "/path1/path2",
+     "user-info" : "user",
+     "query" : "abc=true&amp;bcd=false"
+   },
+   {
+     "scheme" : "ftp",
+     "host" : "ftp.is.co.za",
+     "path" : "/rfc/rfc1808.txt"
+   },
+   {
+     "scheme" : "http",
+     "port" : 123,
+     "host" : "[2001:6f8:9000:876:cccc:bbbb::]",
+     "path" : "/test",
+     "user-info" : "thomas"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/g"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/g/"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/g"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/",
+     "query" : "y"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/g",
+     "query" : "y"
+   },
+   {
+     "scheme" : "http",
+     "fragment" : "s",
+     "host" : "a",
+     "path" : "/b/c/g"
+   },
+   {
+     "scheme" : "http",
+     "fragment" : "s",
+     "host" : "a",
+     "path" : "/b/c/g",
+     "query" : "y"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/;x"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/g;x"
+   },
+   {
+     "scheme" : "http",
+     "fragment" : "s",
+     "host" : "a",
+     "path" : "/b/c/g;x",
+     "query" : "y"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/g"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/g"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/g;x=1/y"
+   },
+   {
+     "scheme" : "http",
+     "host" : "a",
+     "path" : "/b/c/y"
+   },
+   {
+     "scheme" : "http",
+     "fragment" : "s/../x",
+     "host" : "a",
+     "path" : "/b/c/g"
+   },
+   {
+     "scheme" : "http",
+     "host" : "www.example.com",
+     "path" : "/"
+   },
+   {
+     "scheme" : "http",
+     "host" : "www.example.com",
+     "path" : "/dir/file"
+   },
+   {
+     "scheme" : "http",
+     "host" : "www.msb.de"
+   },
+   {
+     "scheme" : "http",
+     "host" : "www.msb.de",
+     "path" : "/lib/helpers"
+   },
+   {
+     "scheme" : "file",
+     "path" : "d:/a/b/c"
+   },
+   {
+     "scheme" : "file",
+     "host" : "localhost",
+     "path" : "d:/a/b/c"
+   },
+   {
+     "scheme" : "file",
+     "host" : "localhost",
+     "path" : "/Ångström/b/c"
+   }
+ ]
+}
+
+for $index in 1 to jn:size($xml-uri-test("uri-test"))
+let $uri := $xml-uri-test("uri-test")($index)
+return ( uri:serialize($uri), "
+")
+

=== added file 'test/rbkt/Queries/zorba/uris/serialize-uri.xq'
--- test/rbkt/Queries/zorba/uris/serialize-uri.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/uris/serialize-uri.xq	2013-04-16 20:29:30 +0000
@@ -0,0 +1,9 @@
+import module namespace uri = "http://www.zorba-xquery.com/modules/uri";;
+
+let $xml-uri-test := fn:doc("uri-source.xml")//uri-element/text
+
+for $uri in $xml-uri-test
+let $parsed-uri := uri:parse($uri)
+return concat(uri:serialize($parsed-uri), "
+")
+

=== added file 'test/rbkt/Queries/zorba/uris/uri-source.xml'
--- test/rbkt/Queries/zorba/uris/uri-source.xml	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/uris/uri-source.xml	2013-04-16 20:29:30 +0000
@@ -0,0 +1,563 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uri-test>
+  <uri-element>
+    <base></base>
+    <uri>http:///</uri>
+    <text>http:///</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host></host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://www.zorba-xquery.com/</uri>
+    <text>http://www.zorba-xquery.com/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>www.zorba-xquery.com</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>com/zorba-xquery/www/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://www.zorba-xquery.com/?abc=true</uri>
+    <text>http://www.zorba-xquery.com/?abc=true</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>www.zorba-xquery.com</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query>abc=true</query>
+    <path-notation>com/zorba-xquery/www/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://www.zorba-xquery.com:8080/?abc=true</uri>
+    <text>http://www.zorba-xquery.com:8080/?abc=true</text>
+    <scheme>http</scheme>
+    <port>8080</port>
+    <fragment></fragment>
+    <host>www.zorba-xquery.com</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query>abc=true</query>
+    <path-notation>com/zorba-xquery/www/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://user@xxxxxxxxxxxxxxxxxxxx:8080/?abc=true</uri>
+    <text>http://user@xxxxxxxxxxxxxxxxxxxx:8080/?abc=true</text>
+    <scheme>http</scheme>
+    <port>8080</port>
+    <fragment></fragment>
+    <host>www.zorba-xquery.com</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info>user</user-info>
+    <query>abc=true</query>
+    <path-notation>com/zorba-xquery/www/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true</uri>
+    <text>http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true</text>
+    <scheme>http</scheme>
+    <port>8080</port>
+    <fragment></fragment>
+    <host>www.zorba-xquery.com</host>
+    <authority></authority>
+    <path>/path1/path2</path>
+    <user-info>user</user-info>
+    <query>abc=true</query>
+    <path-notation>com/zorba-xquery/www/path1/path2</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true&amp;bcd=false#fragment</uri>
+    <text>http://user@xxxxxxxxxxxxxxxxxxxx:8080/path1/path2?abc=true&amp;bcd=false#fragment</text>
+    <scheme>http</scheme>
+    <port>8080</port>
+    <fragment>fragment</fragment>
+    <host>www.zorba-xquery.com</host>
+    <authority></authority>
+    <path>/path1/path2</path>
+    <user-info>user</user-info>
+    <query>abc=true&amp;bcd=false</query>
+    <path-notation>com/zorba-xquery/www/path1/path2</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>ftp://ftp.is.co.za/rfc/rfc1808.txt</uri>
+    <text>ftp://ftp.is.co.za/rfc/rfc1808.txt</text>
+    <scheme>ftp</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>ftp.is.co.za</host>
+    <authority></authority>
+    <path>/rfc/rfc1808.txt</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>za/co/is/ftp/rfc/rfc1808.txt</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://thomas@[2001:6f8:9000:876:cccc:bbbb::]:123/test</uri>
+    <text>http://thomas@[2001:6f8:9000:876:cccc:bbbb::]:123/test</text>
+    <scheme>http</scheme>
+    <port>123</port>
+    <fragment></fragment>
+    <host>[2001:6f8:9000:876:cccc:bbbb::]</host>
+    <authority></authority>
+    <path>/test</path>
+    <user-info>thomas</user-info>
+    <query></query>
+    <path-notation>2001:6f8:9000:876:cccc:bbbb::]/test</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g</uri>
+    <text>http://a/b/c/g</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>./g</uri>
+    <text>http://a/b/c/g</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g/</uri>
+    <text>http://a/b/c/g/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>/g</uri>
+    <text>http://a/g</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>?y</uri>
+    <text>http://a/b/c/?y</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/</path>
+    <user-info></user-info>
+    <query>y</query>
+    <path-notation>a/b/c/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g?y</uri>
+    <text>http://a/b/c/g?y</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g</path>
+    <user-info></user-info>
+    <query>y</query>
+    <path-notation>a/b/c/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g#s</uri>
+    <text>http://a/b/c/g#s</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment>s</fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g?y#s</uri>
+    <text>http://a/b/c/g?y#s</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment>s</fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g</path>
+    <user-info></user-info>
+    <query>y</query>
+    <path-notation>a/b/c/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>;x</uri>
+    <text>http://a/b/c/;x</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/;x</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/;x</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g;x</uri>
+    <text>http://a/b/c/g;x</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g;x</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g;x</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g;x?y#s</uri>
+    <text>http://a/b/c/g;x?y#s</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment>s</fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g;x</path>
+    <user-info></user-info>
+    <query>y</query>
+    <path-notation>a/b/c/g;x</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>.</uri>
+    <text>http://a/b/c/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>./</uri>
+    <text>http://a/b/c/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>..</uri>
+    <text>http://a/b/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>../</uri>
+    <text>http://a/b/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>../g</uri>
+    <text>http://a/b/g</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>../..</uri>
+    <text>http://a/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>../../</uri>
+    <text>http://a/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>../../g</uri>
+    <text>http://a/g</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>>a/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g;x=1/./y</uri>
+    <text>http://a/b/c/g;x=1/y</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g;x=1/y</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g;x=1/y</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g;x=1/../y</uri>
+    <text>http://a/b/c/y</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/y</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>>a/b/c/y</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://a/b/c/d;p?q</base>
+    <uri>g#s/../x</uri>
+    <text>http://a/b/c/g#s/../x</text>
+    <scheme>>http</scheme>
+    <port>0</port>
+    <fragment>s/../x</fragment>
+    <host>a</host>
+    <authority></authority>
+    <path>/b/c/g</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>a/b/c/g</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://www.example.com/</base>
+    <uri>/..</uri>
+    <text>http://www.example.com/</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>www.example.com</host>
+    <authority></authority>
+    <path>/</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>example.com</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://www.example.com/</base>
+    <uri>/../dir1/dir2/../../../dir3/../dir/file</uri>
+    <text>http://www.example.com/dir/file</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>www.example.com</host>
+    <authority></authority>
+    <path>/dir/file</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>example.com</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>http://www.msb.de</uri>
+    <text>http://www.msb.de</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>www.msb.de</host>
+    <authority></authority>
+    <path></path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>de/msb/www</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>http://www.msb.de/</base>
+    <uri>lib/helpers</uri>
+    <text>http://www.msb.de/lib/helpers</text>
+    <scheme>http</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>www.msb.de</host>
+    <authority></authority>
+    <path>/lib/helpers</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>de/msb/www/lib/helpers</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>file:///d:/a/b/c</uri>
+    <text>file:///d:/a/b/c</text>
+    <scheme>file</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host></host>
+    <authority></authority>
+    <path>d:/a/b/c</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>/d:/a/b/c</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>file://localhost/d:/a/b/c</uri>
+    <text>file://localhost/d:/a/b/c</text>
+    <scheme>file</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>localhost</host>
+    <authority></authority>
+    <path>d:/a/b/c</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>localhost/d:/a/b/c</path-notation>
+  </uri-element>
+  <uri-element>
+    <base>file://localhost</base>
+    <uri>/Ångström/b/c</uri>
+    <text>file://localhost/Ångström/b/c</text>
+    <scheme>file</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host>localhost</host>
+    <authority></authority>
+    <path>/Ångström/b/c</path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>localhost/Ångström/b/c</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>file:opaque-uri-part#frag</uri>
+    <text>file:opaque-uri-part#frag</text>
+    <scheme>file</scheme>
+    <port>0</port>
+    <fragment>frag</fragment>
+    <host></host>
+    <authority></authority>
+    <path></path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>opaque-uri-part</path-notation>
+  </uri-element>
+  <uri-element>
+    <base></base>
+    <uri>file:text-file.txt</uri>
+    <text>file:text-file.txt</text>
+    <scheme>file</scheme>
+    <port>0</port>
+    <fragment></fragment>
+    <host></host>
+    <authority></authority>
+    <path></path>
+    <user-info></user-info>
+    <query></query>
+    <path-notation>text-file.txt</path-notation>
+  </uri-element>
+</uri-test>

=== modified file 'test/rbkt/modules/CMakeLists.txt'
--- test/rbkt/modules/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ test/rbkt/modules/CMakeLists.txt	2013-04-16 20:29:30 +0000
@@ -60,4 +60,4 @@
 DECLARE_ZORBA_URI_FILE(FILE "random-file.txt"
   URI "http://zorba-tests.28msec.us/random-file"; TEST_ONLY)
 
-ADD_SUBDIRECTORY(java)
+#ADD_SUBDIRECTORY(java)


Follow ups