4.Wml programming

xiaoxiao2021-03-06  153

[转 _ 编]

The elements of WML usually have a first label, content, other elements, and a tail label. That is, a separate label is an element, and a pair of labels that appear to the content also constitute an element. Due to elements involved and labels, the label also involves attributes. 1 card, card set and its property 1.1 A common attribute of a common attribute WML element mainly 3: ID, Class, and XML: LANG attributes. All Elements of WML have two core properties, namely, (ID), and class (Class) properties. They are mainly used for information transmission of server side. Where the ID property is used to define unique indications in the card group, that is, its name; the Class property is used to define one or more classes (Class) to the current element. Like the card set, class (Class) is also named, and multiple elements can use a class name. All elements in a single card group with the same name can be seen as part of the same class. Class names are case sensitive. If you have multiple unique class names in the class property list, this element can be regarded as part of these classes. A plurality of class names with the same attribute must be intervals with two spaces, and the WML program will be ignored when excess class names and their properties are ignored. In addition, in the WML program, all elements containing text have the "XML: LANG" attribute. This attribute is used to specify the description language used in the current element and its properties, such as British English, US English, French, German, etc., and can provide a basis for the user's browser to select the language of the text. 3.1.2 File header of the WML program typical WML program file header includes the following two lines mentioned in front of us: where" - // WAPFORUN // DTD WML 1.1 // en "is a standard universal tag language SGML Name; "http://www.wapforum.org/dtd/wml_1.1.xml" is the label of the WML program document type. The document type indicator can also be "text / vnd.wap.wml" or "Application / VND.WAP.WMLC", where the former develops the original type of WML, which makes the WML program to compile the code type. 3.1.3 WML Elements WML WML Elements are used to define a card group and contain all cards and information in the card group via and tags. Its syntax format is as follows: Content "Content (content) included in the content included in the content, including Head, Template, and Card elements. Where HEAD, the template element can only be included once, while the Card element must contain at least once. Usage of these elements We will later. 3.1.4 Template Elements The Template element is used to define a template for all the cards in the current card group, and some parameters of the card. Event processing functions in the template can automatically apply these parameters to all cards in the same card group. However, we can also be in the form of a template specified in one or a few cards, and the method is to define an event in the card to replace the corresponding event in the template.

The template function is implemented by the "Content), and its syntax format is implemented by