do-set-local-variable

Sets a local variable with the given name to the string value specified by <arg-string>, the XPath 1.0 node set specified by <arg-node-set>, or the Java* object specified by <arg-object>.

Example

<!-- Sets variable to the string value of the first value of Surname -->
<do-set-local-variable name="lastName">
   <arg-string> 
      <token-attr name="Surname"/> 
   </arg-string> 
</do-set-local-variable>

<!-- sets variable equal to all the value elements of Surname -->
<do-set-local-variable name="lastName"> 
   <arg-node-set> 
      <token-attr name="Surname"/> 
   </arg-node-set> 
</do-set-local-variable>

<!-- sets variable equal to an instance of java.util.Random -->
<!-- note that the prefix jrandom needs to have been mapped to -->
<!-- the URI http://www.novell.com/nxsl/java/java.util.Random -->
<!-- on the <policy> -->
<do-set-local-variable name="lastName"> 
   <arg-object> 
      <token-xpath expression="jrandom:new()"/> 
   </arg-object> 
</do-set-local-variable>

Allowed Content

Element

Description

arg-string

String argument.

arg-node-set

Node set argument.

arg-object

Java object argument.

Attributes

Attribute

Possible Values

Default Value

disabled

true | false

True if this element is disabled.

false

name

NMTOKEN

Name of the variable. Supports variable expansion.

#REQUIRED

notrace

true | false

True if this element should not be traced during execution of the policy.

false

scope

policy | driver

Scope of the variable.

Policy: Variable is visible only within the current policy during the current invocation of the policy.

Driver: Variable is visible to all policies within the current driver until the driver is stopped.

Supports variable expansion.

policy

Content Rule

( arg-string | arg-node-set | arg-object )

Parent Elements

Element

Description

actions

Actions that are performed by a <rule>.

arg-actions

Actions argument.