Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each function library has its own "handle" that is used to access the functions. There are generally two flavors of library function invocation: Invocation for generic scripting environments (Groovy, JavaScript, ...)

...

uses simple variable name to access the functions. The following code snippet shows Groovy syntax for invocation of function norm in library identified by variable basic. The variable names used as library handles are pre-defined. They are specified in the following text.

Code Block
languagejava
basic.norm('Guľôčka v jamôčke!')
  • Invocation for XML-based languages (XPath) which uses XML namespace to access the functions. Usual namespace and namespece prefix handling applies. Following XML snippet illustrates invocation of function norm in a library identified by namespace URI http://midpoint.evolveum.com/xml/ns/public/function/basic-2
Code Block
languagehtml/xml
<script xmlns:libb="http://midpoint.evolveum.com/xml/ns/public/function/basic-2">
    <language>http://www.w3.org/TR/xpath/</language>
    <code>
        libb:norm('Guľôčka v jamôčke!')
    </code>
</script>

Basic Library

Basic function library provides very basic functions for string operations, object property retrieval, etc. These are simple, efficient stand-alone functions.

...