Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SADE
SADE
Commits
5b3cd46d
Commit
5b3cd46d
authored
May 03, 2017
by
Ubbo Veentjer
Browse files
add a module-get method with default value
parent
39a4a0e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/fconfig.xqm
View file @
5b3cd46d
...
...
@@ -47,3 +47,12 @@ declare function fconfig:module-get($module-name as xs:string, $key as xs:string
return
$module/param[ string(@key)=$key ]/node()
};
declare function fconfig:module-get($module-name as xs:string, $key as xs:string, $default as item()?) as item()? {
let $value := fconfig:module-get($module-name , $key)
let $b := console:log($value)
return if (empty($value)) then
$default
else
$value
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment