Support for .jq and .jsd files
Bug #1192043 reported by
Chris Hillery
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
Critical
|
Chris Hillery |
Bug Description
The current module mechanisms only work with .xq and .xsd files. DECLARE_
For JSONiq those are inappropriate; we should support .jq and .jsd as well, ideally without causing a large number of additional lookup attempts.
Related branches
lp:~zorba-coders/zorba/bug-1192043-jqfiles
- Juan Zacarias: Approve
- Chris Hillery: Approve
-
Diff: 448 lines (+82/-31)27 files modifiedcmake_modules/ZorbaModule.cmake (+24/-5)
modules/com/zorba-xquery/www/modules/xqdoc/menu.xq (+2/-0)
modules/functx/CMakeLists.txt (+1/-1)
modules/pregenerated/jsoniq-errors.xq (+2/-2)
modules/pregenerated/zorba-errors.xq (+2/-2)
modules/pregenerated/zorba-warnings.xq (+2/-2)
modules/w3c/pregenerated/xqt-errors.xq (+2/-2)
modules/w3c/xpath_functions.xq (+2/-0)
modules/w3c/xpath_functions_math.xq (+2/-0)
schemas/CMakeLists.txt (+2/-2)
schemas/pul.xsd (+2/-2)
src/context/default_uri_mappers.cpp (+7/-7)
src/context/dynamic_loader.cpp (+4/-4)
src/diagnostics/diagnostic_list_xq.xq (+2/-2)
test/rbkt/ExpQueryResults/zorba/fetch/fetch_module1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/fetch/fetch_module2.xml.res (+2/-0)
test/rbkt/modules/bad-ver.xq (+2/-0)
test/rbkt/modules/ext.xq (+2/-0)
test/rbkt/modules/ext2.xq (+2/-0)
test/rbkt/modules/link.xq (+2/-0)
test/rbkt/modules/module-A.xq (+2/-0)
test/rbkt/modules/module-B.xq (+2/-0)
test/rbkt/modules/schema.xq (+2/-0)
test/rbkt/modules/ver.xq (+2/-0)
test/rbkt/modules/ver2.xq (+2/-0)
test/unit/testGetExtVarA.xq (+2/-0)
test/unit/testGetExtVarB.xq (+2/-0)
Changed in zorba: | |
status: | New → In Progress |
Changed in zorba: | |
status: | In Progress → Fix Committed |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
One way to do this would be to hash the module/schema URI and use that hash to look up the correct file on disk. That would actually reduce the number of lookups currently done, since we currently attempt to file the file with a .xq extension and then again without the .xq extension.
We would not need to hash whether the module/schema was JSONiq or XQuery, unless for some bizarre reason we need to have an XQuery module and a JSONiq module with the same URI (hopefully not!). However, we would need to hash whether the URI was a module or schema (or "something else", for fetch()), because we do have schemas and modules with shared URIs.
It's not completely clear how this would play with the module-versioning mechanism.