Home > Contents > Index >
CALLELEMENT
Processes the content of an element.
Syntax
<CALLELEMENT NAME="ELEMENT NAME" [PACKEDARGS="PACKEDARG NAMES"] [SCOPED="SCOPING OPTION/>] <ARGUMENTNAME="ARG NAME" VALUE="ARG VALUE"/> </CALLELEMENT>Parameters
NAME (required)- Name of the element to call.
PACKEDARGS (optional)- A name/value pair to pass to the called element. Pairs are in the format
x=y&a=b&c=d. This is useful if a string in this form is retrieved from a database field. It is more efficient to pass individual parameters rather than constructing a string in this form to pass values to an element.
SCOPED (optional)- Valid options for this attribute are as follows:
GLOBAL- the default behaviorLOCAL- arguments passed in are restored (or destroyed) on return from the call.STACKED- the child only sees the explicit arguments passed in and can only return values in that same namespace.Description
The
CALLELEMENTtag processes the content of an element. The element must exist in theElementCatalog.Variables that exist prior to
CALLELEMENTare available to tags within the called element. Variables set within the called element are available in the parent element after theCALLELEMENTtag. Variables can also be set using theARGUMENTtag within theCALLELEMENTtag or by using thePACKEDARGSparameter.Variables for the
CALLELEMENTtag are subject to an order of precedence. The order of precedence is relative to the location of the variable as follows:
1. Variables set in arguments
2. Variables set in scripts
3. resdetails1 and resdetails2 of the ElementCatalog
The following are examples of how the order of precedence works:
- In the following element, the
arg=3variable is set in the resdetails1 column in the ElelementCatalog. Theargvalue with the highest order of precedence isvalue1.
<SETVAR NAME="arg" VALUE="value2"/> ... <CALLELEMENT NAME="element name"> <ARGUMENT NAME="arg" VALUE="value1"/> </CALLELEMENT>In the following element, the arg=value3is set in the redetails1 column in the ElementCatalog. Theargvalue with the highest order of precedence isvalue2.
<SETVAR NAME="arg" VALUE="value2"/> ... <CALLELEMENT NAME="element name"> </CALLELEMENT>In the following element, the arg=value3is set in the resdetails1 column of the ElementCatalog. Theargvalue with the highest order of precedence isvalue3; this is occurs when a variable is not defined in scope before theCALLELEMENTtag.
<CALLELEMENT NAME="element name"> </CALLELEMENT>Note: There was a bug that the caller variables were available in the callee when the scope is local. This has been fixed in version 11gR1. To go back to the previous behavior add -DuseLegacyLocalScoping=true to JVM parameter.
Error Numbers
The possible values of
errnoinclude:
Value Description -10 No element exists. -12 Cannot evaluate element.Example
This example calls the element
SimpleTestwith the argumentsFooandFoo2.<SETVAR NAME="errno" VALUE="0"/> <CALLELEMENT NAME="SimpleTest"> <ARGUMENT NAME="Foo" VALUE="Bar"/> <ARGUMENT NAME="Foo2" VALUE="Bar2"/> </CALLELEMENT> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>You can specify
PACKEDARGSin the following format:<SETVAR NAME="errno" VALUE="0"/> <SETVAR NAME="args" VALUE="Foo=Bar&Foo2=Bar2"/> <CALLELEMENT NAME="SimpleTest" PACKEDARGS="Variables.args"> </CALLELEMENT> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>The parameters
FooandFoo2with valuesBarandBar2are available to the elementSimpleTest.See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.