Call Command¶
Command that use for attache external document to specific location of current document.
Note
The call
command inherit from CommandBase Class.
Important
The call
command present as void command and don’t have any child elements.
1 | <basis core="call" file="" pagesize="" />
|
Attributes¶
- file
string
requierd
Name of document that must be attached.
- pagesize
number
optional
Number that represent page size for load preferred page related to viewport size and responsive.
Remarks¶
A call
command act like include
in other programming language, but important deferent is that content of specified file
replace with call
command instance.
For example suppose we have two file like bellow:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <html>
<head>
</head>
<body>
<h1>
main
</h1>
<basis core='dbsource' name='db' source='basiscore' >
<member name='user-info' />
</basis>
<basis core="call" file="second.html" />
</body>
</html>
|
1 2 3 4 5 6 7 8 9 10 11 | <h1>
second
</h1>
<basis core="print" datamembername="db.user-info">
<face>
First Name is :@fname
<br/>
Last Name is :@lname
</face>
</basis>
|
As mentioned earlier content of page determined with file
attribute, replace with call
command.
This process happen just before start executing document’s commands.
So before start execution and just after process call
command, result is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <html>
<head>
</head>
<body>
<h1>
main
</h1>
<basis core='dbsource' name='db' source='basiscore' >
<member name='user-info' />
</basis>
<h1>
second
</h1>
<basis core="print" datamembername="db.user-info">
<face>
First Name is :@fname
<br/>
Last Name is :@lname
</face>
</basis>
</body>
</html>
|
Now we have a Print Command command with related DbSource command that can be execute and generate result successfully.
Note
Recursive call
supported so infinite-loop can happen by load calling file in called file.
CallMaxDepth
property from Setting
collection of host
Can use for set maximum level of recursive depth.
For more information, see Host Configuration