Changes

Jump to navigation Jump to search
286 bytes added ,  14:19, 20 July 2022
no edit summary
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|proc:system|$cmd as xs:string|xs:string}}<br/>{{Func|proc:system|$cmd as xs:string, $args as xs:string*|xs:string}}<br/>{{Func|proc:system|$cmd as xs:string, $args as xs:string*, $options as map(xs:string, xs:string)|xs:string}}<br/>
|-valign="top"
| '''Summary'''
|Executes the specified command in a separate process and returns the result as string. {{Code|$cmd}} is the name of the command, arguments to the command may be specified via {{Code|$args}}. The {{Code|$options}} parameter contains process options:
* {{Code|dir}}: process command in the specified directory.
* {{Code|input}}: standard string input ({{Code|stdin}}) to be passed on to the command.
|-valign="top"
|'''Errors'''
|{{Error|encoding|#Error}} the specified encoding does not exist or is not supported.<br/>{{Error|timeout|#Error}} the specified timeout was exceeded.<br/>{{Error|error|#Error}} the command could not be executed, or an I/O exception was raised.<br/>{{Error|code....|#Error}} If the commands returns an exit code different to 0, an error will be raised. Its code will consist of the letters {{Code|code}} and four digits with the exit code.<br/>
|-valign="top"
| '''Examples'''
|
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|proc:execute|$cmd as xs:string|element(result)}}<br/>{{Func|proc:execute|$cmd as xs:string, $args as xs:string*|element(result)}}<br/>{{Func|proc:execute|$cmd as xs:string, $args as xs:string*, $options as map(xs:string, xs:string)|element(result)}}
|-valign="top"
| '''Summary'''
|Executes the specified command in a separate process and returns the result as element:
</result>
</syntaxhighlight>
|-valign="top"
|'''Errors'''
|{{Error|encoding|#Error}} the specified encoding does not exist or is not supported.<br/>{{Error|timeout|#Error}} the specified timeout was exceeded.
|-valign="top"
| '''Examples'''
|
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|proc:fork|$cmd as xs:string|element(result)}}<br/>{{Func|proc:fork|$cmd as xs:string, $args as xs:string*|element(result)}}<br/>{{Func|proc:fork|$cmd as xs:string, $args as xs:string*, $options as map(xs:string, xs:string)|element(result)}}
|-valign="top"
| '''Summary'''
|Executes the specified command and ignores the result. {{Code|$cmd}} is the name of the command, and arguments to the command may be specified via {{Code|$args}}. The same {{Code|$options}} are allowed as for {{Function||proc:system}} (but the encoding will be ignored).
|-valign="top"
|'''Errors'''
|{{Error|encoding|#Error}} the specified encoding does not exist or is not supported.
|-valign="top"
| '''Examples'''
|
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|proc:property|$name as xs:string|xs:string?}}<br/>
|-valign="top"
| '''Summary'''
|Returns the system property, specified by {{Code|$name}}, or a context parameter of the {{Code|web.xml}} file with that name (see [[Web_Application#Configuration|Web Applications]]). An empty sequence is returned if the property does not exist. For environment variables of the operating system, please use [https://www.w3.org/TR/xpath-functions-30/#func-environment-variable fn:environment-variable].
|-valign="top"
| '''Examples'''
|
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|proc:property-names||xs:string*}}<br/>
|-valign="top"
| '''Summary'''
|Returns the names of all Java system properties and context parameters of the {{Code|web.xml}} file (see [[Web_Application#Configuration|Web Applications]]). For environment variables of the operating system, please use [https://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables fn:available-environment-variables].
|-valign="top"
| '''Examples'''
|
! width="110"|Code
|Description
|-valign="top"
|{{Code|code...}}
|The result of a command call with an exit code different to 0.
|-valign="top"
|{{Code|code9999}}
|A command could not be executed.
|-valign="top"
|{{Code|encoding}}
|The specified encoding does not exist or is not supported.
|-valign="top"
|{{Code|timeout}}
|The specified timeout was exceeded.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu