zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #26175
[Merge] lp:~zorba-coders/zorba/bug-1192043-jqfiles into lp:zorba
Chris Hillery has proposed merging lp:~zorba-coders/zorba/bug-1192043-jqfiles into lp:zorba.
Commit message:
Use .module/.schema extension for installing URIs.
Requested reviews:
Chris Hillery (ceejatec)
Related bugs:
Bug #1192043 in Zorba: "Support for .jq and .jsd files"
https://bugs.launchpad.net/zorba/+bug/1192043
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1192043-jqfiles/+merge/190751
--
https://code.launchpad.net/~zorba-coders/zorba/bug-1192043-jqfiles/+merge/190751
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'cmake_modules/ZorbaModule.cmake'
--- cmake_modules/ZorbaModule.cmake 2013-08-16 00:53:45 +0000
+++ cmake_modules/ZorbaModule.cmake 2013-10-11 20:02:39 +0000
@@ -110,7 +110,7 @@
#
# Args: URI - the namespace URI of the module
# VERSION - (optional) the version of the module, major.minor[.patch]
-# FILE - path to .xq file (if not absolute, will be resolved
+# FILE - path to module file (if not absolute, will be resolved
# relative to CMAKE_CURRENT_SOURCE_DIR)
# LINK_LIBRARIES - (optional) List of libraries to link external
# function library against
@@ -154,7 +154,7 @@
ENDIF (NOT IS_ABSOLUTE "${MODULE_FILE}")
GET_FILENAME_COMPONENT (module_name "${MODULE_FILE}" NAME)
- MANGLE_URI (${MODULE_URI} ".xq" module_path module_filename)
+ MANGLE_URI (${MODULE_URI} ".module" module_path module_filename)
# Determine which module this is, numerically. This number will be
# used to generate unique names, for instance for the target name
@@ -418,7 +418,7 @@
# schema into the URI_PATH folder so it will be found at runtime.
#
# Args: URI - the namespace URI of the schema
-# FILE - path to .xsd file (if not absolute, will be resolved
+# FILE - path to schema file (if not absolute, will be resolved
# relative to CMAKE_CURRENT_SOURCE_DIR)
# TEST_ONLY - (optional) Schema is for testcases only and should not
# be installed
@@ -436,7 +436,7 @@
SET (SOURCE_FILE "${SCHEMA_FILE}")
ENDIF (NOT IS_ABSOLUTE "${SCHEMA_FILE}")
GET_FILENAME_COMPONENT (schema_name "${SCHEMA_FILE}" NAME)
- MANGLE_URI (${SCHEMA_URI} ".xsd" schema_path schema_filename)
+ MANGLE_URI (${SCHEMA_URI} ".schema" schema_path schema_filename)
# Add to schema manifest (except test schema).
IF (NOT SCHEMA_TEST_ONLY)
=== modified file 'src/context/default_uri_mappers.cpp'
--- src/context/default_uri_mappers.cpp 2013-08-09 10:59:01 +0000
+++ src/context/default_uri_mappers.cpp 2013-10-11 20:02:39 +0000
@@ -57,10 +57,10 @@
switch (lKind)
{
case EntityData::SCHEMA:
- lExtension = ".xsd";
+ lExtension = ".schema";
break;
case EntityData::MODULE:
- lExtension = ".xq";
+ lExtension = ".module";
break;
default:
break;
@@ -81,7 +81,7 @@
lChanged = true;
}
else {
- // If not, append ".xsd" or ".xq" if it's not already there.
+ // If not, append ".schema" or ".module" if it's not already there.
if (!ascii::ends_with(lPath, lExtension)) {
lPath.append(lExtension);
lChanged = true;
@@ -116,12 +116,12 @@
return;
}
- // Ensure that the namespace URI ends in ".xq", and then strip it.
+ // Ensure that the namespace URI ends in ".module", and then strip it.
zstring const lBaseUri = lModVer.namespace_uri();
- if ( ! ascii::ends_with(lBaseUri, ".xq")) {
+ if ( ! ascii::ends_with(lBaseUri, ".module")) {
return;
}
- zstring const lRootUri = lBaseUri.substr(0, lBaseUri.size() -3);
+ zstring const lRootUri = lBaseUri.substr(0, lBaseUri.size() - 7);
// Ok, we've successfully parsed a version-request fragment. Form up a set of
// new URIs based on the original minus the fragment.
@@ -135,7 +135,7 @@
// it's OK to check here even though we're looping.
lFormat << "." << lModVer.min_minor();
}
- lFormat << ".xq";
+ lFormat << ".module";
oUris.push_back(zstring(lFormat.str()));
}
=== modified file 'src/context/dynamic_loader.cpp'
--- src/context/dynamic_loader.cpp 2013-09-30 22:53:42 +0000
+++ src/context/dynamic_loader.cpp 2013-10-11 20:02:39 +0000
@@ -84,12 +84,12 @@
lBranchPath = lPathNotation.substr(0, lIndexOfLastSlash + 1);
}
- // remove .xq from the end of the file if present
+ // remove .module from the end of the file if present
// bugfix: find_last_of didn't do the right thing
- size_t lIndexOfXQ = lFileName.find(".xq");
- if (lIndexOfXQ != std::string::npos && lIndexOfXQ == lFileName.size() - 3)
+ size_t lIndexOfModule = lFileName.find(".module");
+ if (lIndexOfModule != std::string::npos && lIndexOfModule == lFileName.size() - 3)
{
- lFileName.erase(lIndexOfXQ);
+ lFileName.erase(lIndexOfModule);
}
}
References