Failure setting relative base-uri when no absolute base known

Bug #1169191 reported by Sorin Marian Nasoi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Chris Hillery

Bug Description

Test cases xqhof16 to xqhof18 in misc-HigherOrderFunctions try to import a module with target URI equal to "lib". This module in turn declares the base-uri to be "lib". This results in the following error:

</tmp/query_xqhof16.xq>:16,22: user-defined error [http://www.w3.org/2005/xqt-errors#XQST0046]: The query compiled using xqxq:prepare-main-module raised an error at file lib line 3 column 1: invalid URI literal: no URI scheme; raised at /home/ceej/zo/src/modules/xqxq/xqxq.xq.src/xqxq.cpp:515

Related branches

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :
tags: added: fots
Revision history for this message
Chris Hillery (ceejatec) wrote :

The problem turns out to be in static_context:set_base_uri(). In this case, the entity-retrieval URI for the module itself is just "lib", since (due to the XQXQ URL resolver) Zorba has no way of knowing the actual URI used to load the module. This entity-retrieval URI is used as the absolute base URI to resolve the declared base URI of "lib" against, but since the entity-retrieval URI isn't itself absolute, URI::resolve_uri() dies with the error.

description: updated
Changed in zorba:
assignee: Sorin Marian Nasoi (sorin.marian.nasoi) → Chris Hillery (ceejatec)
milestone: none → 2.9
summary: - module resolving
+ Failure setting relative base-uri when no absolute base known
Chris Hillery (ceejatec)
Changed in zorba:
status: New → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.