You can use a Uniform Resource Locator (URL) to access a WMLScript file. Use the use url pragma to call a function in an external file. For example:
use url OtherScript "http://www.host.com/app/script";
To call an external file, you must specify the following:
The URL of the WMLScript resource (http://www.host.com/app/script)
The resource's name (OtherScript)
Then, inside function declarations, use the resource name. For example:
function test (par1, par2) {
return OtherScript#check (par1-par2);
}
The example function call demonstrates these principles:
The pragma specifies the URL to the WMLScript file.
The function call loads the file using the specified URL.
The function verifies the file's content and executes the specified function (check).
The use url pragma has its own namespace for local names. However, the local names must be unique within any given file. WMLScript supports URLs and relative URLs without a hash mark (#) or a fragment identifier. For more information, visit:
http://info.internet.isi.edu/in-notes/rfc/files/rfc2396.txt
For relative URLs, the base URL identifies the current file. The specified URL must be escaped according to the URL escaping rules. WMLScript performs no compile-time automatic escaping, URL syntax, or URL validity checking.