--uri-path doesn't work with fetch:content()
Bug #948879 reported by
Chris Hillery
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
High
|
Matthias Brantner |
Bug Description
The zorbacmd command-line arguments --uri-path, --lib-path, and --module-path modify the StaticContext that runs the query. However, if this query invokes the fetch module, the invocation of fetch:content() is in a separate StaticContext that does not inherit those paths. The upshot is that you can't fetch content from any custom paths, only the built-in Zorba paths.
Related branches
lp:~zorba-coders/zorba/bug-948879
- Chris Hillery: Approve
- Matthias Brantner: Approve
-
Diff: 188 lines (+110/-0)6 files modifiedChangeLog (+1/-0)
include/zorba/static_context.h (+32/-0)
include/zorba/xmldatamanager.h (+2/-0)
src/api/staticcontextimpl.cpp (+46/-0)
src/api/staticcontextimpl.h (+6/-0)
test/unit/static_context.cpp (+23/-0)
Changed in zorba: | |
importance: | Undecided → High |
assignee: | nobody → Matthias Brantner (matthias-brantner) |
description: | updated |
Changed in zorba: | |
milestone: | none → 2.5 |
Changed in zorba: | |
status: | In Progress → Fix Committed |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The problem is not related to the fetch module. This module uses the right static context. However, the problem is that the fetch function of the XmlDataManager in the C++ api uses the root static context to fetch resources. Instead, it should use a user-provided static context. Alternatively, the fetch function could be moved into the StaticContext class itself.