/** * Add an XQuery library module to the configuration. The Executable maintains a table indicating * for each module namespace, the set of modules that have been loaded from that namespace. If a * module import is encountered that specifies no location hint, all the known modules for that * namespace are imported. * @param module the library module to be added to this executable */ public void addQueryLibraryModule(QueryModule module) { if (queryLibraryModules == null) { queryLibraryModules = new HashMap(5); } String uri = module.getModuleNamespace(); List existing = (List)queryLibraryModules.get(uri); if (existing == null) { existing = new ArrayList(5); existing.add(module); queryLibraryModules.put(uri, existing); } else { existing.add(module); } }
/** * Add an XQuery library module to the configuration. The Executable maintains a table indicating * for each module namespace, the set of modules that have been loaded from that namespace. If a * module import is encountered that specifies no location hint, all the known modules for that * namespace are imported. * @param module the library module to be added to this executable */ public void addQueryLibraryModule(QueryModule module) { if (queryLibraryModules == null) { queryLibraryModules = new HashMap(5); } String uri = module.getModuleNamespace(); List existing = (List)queryLibraryModules.get(uri); if (existing == null) { existing = new ArrayList(5); existing.add(module); queryLibraryModules.put(uri, existing); } else { existing.add(module); } }
/** * Add an XQuery library module to the configuration. The Executable maintains a table indicating * for each module namespace, the set of modules that have been loaded from that namespace. If a * module import is encountered that specifies no location hint, all the known modules for that * namespace are imported. * * @param module the library module to be added to this executable */ public void addQueryLibraryModule(QueryModule module) { if (queryLibraryModules == null) { queryLibraryModules = new HashMap<>(5); } String uri = module.getModuleNamespace(); List<QueryModule> existing = queryLibraryModules.get(uri); if (existing == null) { existing = new ArrayList<>(5); existing.add(module); queryLibraryModules.put(uri, existing); } else if (!existing.contains(module)){ existing.add(module); } }
/** * Add an XQuery library module to the configuration. The Executable maintains a table indicating * for each module namespace, the set of modules that have been loaded from that namespace. If a * module import is encountered that specifies no location hint, all the known modules for that * namespace are imported. * @param module the library module to be added to this executable */ public void addQueryLibraryModule(QueryModule module) { if (queryLibraryModules == null) { queryLibraryModules = new HashMap(5); } String uri = module.getModuleNamespace(); List existing = (List)queryLibraryModules.get(uri); if (existing == null) { existing = new ArrayList(5); existing.add(module); queryLibraryModules.put(uri, existing); } else { existing.add(module); } }
/** * Add an XQuery library module to the configuration. The Executable maintains a table indicating * for each module namespace, the set of modules that have been loaded from that namespace. If a * module import is encountered that specifies no location hint, all the known modules for that * namespace are imported. * * @param module the library module to be added to this executable */ public void addQueryLibraryModule(QueryModule module) { if (queryLibraryModules == null) { queryLibraryModules = new HashMap<>(5); } String uri = module.getModuleNamespace(); List<QueryModule> existing = queryLibraryModules.get(uri); if (existing == null) { existing = new ArrayList<>(5); existing.add(module); queryLibraryModules.put(uri, existing); } else if (!existing.contains(module)){ existing.add(module); } }
if (!imp.namespaceURI.equals(((QueryModule)env).getModuleNamespace())) { QueryModule parent = (QueryModule)env; if (!parent.mayImportModule(imp.namespaceURI)) {
if (!imp.namespaceURI.equals(((QueryModule)env).getModuleNamespace())) { QueryModule parent = (QueryModule)env; if (!parent.mayImportModule(imp.namespaceURI)) {
String module = getModuleNamespace(); if (module == null) { msg += "the main query module";
String module = getModuleNamespace(); if (module == null) { msg += "the main query module";
if (mImport.namespaceURI.equals(thisModule.getModuleNamespace()) && mImport.namespaceURI.equals(thisModule.checkURIForPrefix(prefix))) {
if (mImport.namespaceURI.equals(thisModule.getModuleNamespace()) && mImport.namespaceURI.equals(thisModule.checkURIForPrefix(prefix))) {
while (moduleIter.hasNext()) { QueryModule importedModule = (QueryModule) moduleIter.next(); String moduleNamespace = importedModule.getModuleNamespace(); String prefix = getPrefixForNamespace(moduleNamespace); if (!StringUtils.isBlank(prefix)) {
qp.parseLibraryModule(query, module); if (module.getModuleNamespace() == null) { XPathException err = new XPathException("Imported module must be a library module"); err.setErrorCode("XQST0059"); throw err; if (!module.getModuleNamespace().equals(namespaceURI)) { XPathException err = new XPathException("Imported module's namespace does not match requested namespace"); err.setErrorCode("XQST0059");
qp.parseLibraryModule(query, module); if (module.getModuleNamespace() == null) { XPathException err = new XPathException("Imported module must be a library module"); err.setErrorCode("XQST0059"); throw err; if (!module.getModuleNamespace().equals(namespaceURI)) { XPathException err = new XPathException("Imported module's namespace does not match requested namespace"); err.setErrorCode("XQST0059");
String moduleURI = ((QueryModule)env).getModuleNamespace(); if (moduleURI != null && !moduleURI.equals(uri)) { grumble("A variable declared in a library module must be in the module namespace", "XQST0048"); if (qenv.getModuleNamespace() != null && !uri.equals(qenv.getModuleNamespace())) { grumble("Variable " + Err.wrap(varName, Err.VARIABLE) + " is not defined in the module namespace");
String moduleURI = ((QueryModule)env).getModuleNamespace(); if (moduleURI != null && !moduleURI.equals(uri)) { grumble("A variable declared in a library module must be in the module namespace", "XQST0048"); if (qenv.getModuleNamespace() != null && !uri.equals(qenv.getModuleNamespace())) { grumble("Variable " + Err.wrap(varName, Err.VARIABLE) + " is not defined in the module namespace");
String moduleURI = ((QueryModule) env).getModuleNamespace(); if (moduleURI != null && !moduleURI.equals(uri)) { grumble("A variable declared in a library module must be in the module namespace", "XQST0048", offset); ExpressionTool.setDeepRetainedStaticContext(var.getBody(), rsc); if (qenv.getModuleNamespace() != null && !uri.equals(qenv.getModuleNamespace())) { grumble("Variable " + Err.wrap(varName, Err.VARIABLE) + " is not defined in the module namespace");
String moduleURI = ((QueryModule) env).getModuleNamespace(); if (moduleURI != null && !moduleURI.equals(uri)) { grumble("A variable declared in a library module must be in the module namespace", "XQST0048", offset); ExpressionTool.setDeepRetainedStaticContext(var.getBody(), rsc); if (qenv.getModuleNamespace() != null && !uri.equals(qenv.getModuleNamespace())) { grumble("Variable " + Err.wrap(varName, Err.VARIABLE) + " is not defined in the module namespace");
String namespace = module.getModuleNamespace(); if (namespace == null) { XPathException err = new XPathException("Imported module must be a library module");
String namespace = module.getModuleNamespace(); if (namespace == null) { XPathException err = new XPathException("Imported module must be a library module");