← Back to team overview

zorba-coders team mailing list archive

[Bug 956347] [NEW] Extend XQXQ module functionality by exposing the prolog

 

Public bug reported:

adding the following two functions to the XQXQ module should allow for an arbitrary static context to be set up as required (e.g. declaring namespaces, enabling the hof option, ...).
Hence, it should not be required anymore to make changes to the original query.

 declare %ann:sequential function prepare-library-module(
 $library-module-text as xs:string,
         $prolog as xs:string ) as empty-sequence() external;

 and

 declare %ann:sequential  function prepare-main-module (
 $main-module-text as xs:string,
         $prolog as xs:string ) as xs:anyURI external;

 The $prolog parameter can be an arbitrary XQuery prolog that is used to
 populate the
 static context of the module to be compiled. To do this, the
 StaticContext::loadProlog
 function of the C++ API can be used.

** Affects: zorba
     Importance: Low
     Assignee: Sorin Marian Nasoi (sorin.marian.nasoi)
         Status: New


** Tags: xqxq

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/956347

Title:
  Extend XQXQ module functionality by exposing the prolog

Status in Zorba - The XQuery Processor:
  New

Bug description:
  adding the following two functions to the XQXQ module should allow for an arbitrary static context to be set up as required (e.g. declaring namespaces, enabling the hof option, ...).
  Hence, it should not be required anymore to make changes to the original query.

   declare %ann:sequential function prepare-library-module(
   $library-module-text as xs:string,
           $prolog as xs:string ) as empty-sequence() external;

   and

   declare %ann:sequential  function prepare-main-module (
   $main-module-text as xs:string,
           $prolog as xs:string ) as xs:anyURI external;

   The $prolog parameter can be an arbitrary XQuery prolog that is used to
   populate the
   static context of the module to be compiled. To do this, the
   StaticContext::loadProlog
   function of the C++ API can be used.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/956347/+subscriptions


Follow ups

References