WMLScript Reference

[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Chapter 4 - Pragmas
Section 17 out of 34 total sections , Section 3 out of 3 sections in this chapter


Access Control

You can use an access control pragma to protect a file's content. You must call the access control pragma before calling external functions. Also, having more than one access control pragma in a file will generate a compiler error.

Every time an external function is invoked, the compiler performs an access control check to determine if the destination file allows access from the caller. The access control pragma specifies domain and path attributes against which the access control checks are performed. If a file has a domain or path attribute, the referring file's URL must match the values of the attributes. Matching is done as follows:

Domain and path attributes follow the URL capitalization rules.

Domain suffix matching is done using the entire element of each sub-domain, and must match each element exactly. For example, www.wapforum.org matches wapforum.org but not forum.org.

Path prefix matching is done using entire path elements and must match each element exactly. For example, /X/Y matches /X, but not /XZ.

The domain attribute defaults to the current file's domain. The path attribute defaults to the value " / ".

To simplify the development of applications that may not know the absolute path to the current file, the path attribute accepts relative URLs. The user agent converts the relative path to an absolute path and then performs prefix matching against the path attribute. For example, if the access-control attributes for a file are

use access domain "wapforum.org" path "/finance";  

the following referring URLs would be allowed to call the external functions specified in this file.

http://wapforum.org/finance/money.cgi  
https://www.wapforum.org/finance/markets.cgi  
http://www.wapforum.org/finance/demos/packages.cgi?x+123&y+456  

The following URLs would not be allowed to call the external function.

http://www.test.net/finance  
http://www.wapforum.org/internal/foo.wml  

By default, access control is disabled.



Meta-Information

Meta-pragmas specify a file's property name and content; Meta-pragmas can also specify a file's scheme, which specify a form or structure that may be used to interpret the property value--the values vary depending on the type of meta-data. The attribute values are string literals.

Meta-pragmas do not define any properties, nor do they define how user agents must interpret meta-data. User agents are not required to act on the meta-data.

Meta-pragmas can have the following attributes:



Name


Definition

Specifies meta-information used by the origin servers.


Examples

use meta name "Created" "18-June-1999";  

Comments

The user agent should ignore any meta data named with this attribute. Network servers should not emit WMLScript 1.1 content containing name meta-pragmas.



HTTP Equiv


Definition

Specifies meta-information that indicates that the property should be interpreted as an HTTP header.


Examples

use meta http equiv "Keywords" "Script, Language";  

Comments

Meta-data named with this attribute should be converted to a wireless session protocol (WSP) or HTTP response header if the file is compiled before it arrives at the user agent.



User Agent


Definition

Specifies meta-information intended to be used by the user agents.


Examples

use meta user agent "Type" "Test";  

Comments

This meta-data must be delivered to the user agent and must not be removed by any network intermediary.


[Cover] [Previous Section] [Next Section] [Index]


Part Number DKWS-41-002, UP.SDK Release 4.1, December 2000

Copyright © 1994-2000 Openwave Systems Inc. All rights reserved.
Please send comments and questions to sdk-doc-comments@openwave.com.