This chapter discusses the features of WMLScript known as
which specify meta-information about a WMLScript unit, in a similar
way to the
<access> elements for WML files. (See Chapter 6, for more information on these WML elements.)
You have already encountered one pragma, the
pragma for referencing other WMLScript units, in Chapter 13. In addition, there is an
access pragma, corresponding to WML’s
<access> element, and a
meta pragma, corresponding to the
<meta> element. These pragmas are processed
by the WAP gateway (see Appendix B) to control the
headers sent along with the compiled unit.
All pragmas in a WMLScript file must be specified before any functions. The individual pragmas may be specified in any order, however.
pragma provides the same simple access
control as the
<access> element does for WML
decks. That is, it specifies a domain and path that must match the
URL of the caller for a call to be permitted.
There are three forms:
use access domain
domain;use access path
path;use access domain
are normal WMLScript string
literals. They are interpreted in exactly the same way as the
attributes of WML’s
<access> element. (See Chapter 6 for more information.) There may be no more
access pragma per WMLScript file.
For example, the pragma:
use access domain "wap.net" path "/private";
restricts access to WML and WMLScript that originates ...