Public bug reported:

For example, it would be cool if we could do something like this:

   import module namespace f="http://www.zorba-
xquery.com/modules/resolvers";

   declare function foo ()...

   f:register-uri-mapper(foo#2)

..and then subsequent URI resolutions would invoke foo().

Open issues/questions/notes:

  * Do we need different versions / parameters to register a URLResolver
that returns things other than strings? (eg. other than StreamResources)

  * May also need a separate XQXQ function to register resolvers on a
static-context object (above API is only good for intra-query usage - if
we want import statements to also be resolved, needs to be done from
outside query using XQXQ)

  * Above API may not be implementable yet - the higher-order functions
might not be exposed appropriately through the C++ API. Either fix this,
or design the API based on QNames rather than function pointers.

** Affects: zorba
     Importance: Low
     Assignee: Chris Hillery (ceejatec)
         Status: New

** Changed in: zorba
     Assignee: (unassigned) => Chris Hillery (ceejatec)

** Changed in: zorba
   Importance: Undecided => Low

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

Title:
  Ability to write URI mappers in XQuery

Status in Zorba - The XQuery Processor:
  New

Bug description:
  For example, it would be cool if we could do something like this:

     import module namespace f="http://www.zorba-
  xquery.com/modules/resolvers";

     declare function foo ()...

     f:register-uri-mapper(foo#2)

  ..and then subsequent URI resolutions would invoke foo().

  Open issues/questions/notes:

    * Do we need different versions / parameters to register a
  URLResolver that returns things other than strings? (eg. other than
  StreamResources)

    * May also need a separate XQXQ function to register resolvers on a
  static-context object (above API is only good for intra-query usage -
  if we want import statements to also be resolved, needs to be done
  from outside query using XQXQ)

    * Above API may not be implementable yet - the higher-order
  functions might not be exposed appropriately through the C++ API.
  Either fix this, or design the API based on QNames rather than
  function pointers.

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

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