[UP]
The UI language
 ui:a
 ui:alist-value and ui:alist-item
 ui:application
 ui:button
 ui:checkbox
 ui:cond
 ui:context
 ui:default
 ui:dialog
 ui:dyn-enum-value and ui:dyn-enum-item
 ui:dynamic
 ui:encode
 ui:enum-value and ui:enum-item
 ui:enumerate
 ui:enumeration and ui:enum
 ui:false
 ui:file
 ui:form
 ui:if
 ui:ifexpr
 ui:iflang
 ui:ifvar
 ui:imagebutton
 ui:iter-*
 ui:iterate
 ui:page
 ui:param
 ui:popup
 ui:radio
 ui:richbutton
 ui:select
 ui:server-popup
 ui:special
 ui:string-value
 ui:template
 ui:text and ui:password
 ui:textarea
 ui:translate
 ui:true
 ui:use
 ui:variable
 t:*, q:*, and p:*
 l:*
 $param
 $[expr]
 Dot notation (v1.v2)
   
The element ui:template

This element defines a template. For an overview, see the chapter about Templates.

Declaration

Level: Control structure

<!ELEMENT ui:template ANY>

<!ATTLIST ui:template
          name               NMTOKEN  #REQUIRED
          from-caller        NMTOKENS #IMPLIED
          from-context       NMTOKENS #IMPLIED
          xml:lang           NMTOKEN  #IMPLIED
>

The subelements of ui:template must match the informal rule ( ui:default*, %page-body;* ) where %page-body; stands symbolically for all allowed sub elements. Note that whitespace between the %page-body; elements counts, but at the other positions it is ignored.

Attributes

  • name: The name of the template. Template names are globally known.

  • from-caller: The space-separated list of parameters with lexical scope.

  • from-context: The space-separated list of parameters with dynamic scope.

  • xml:lang: If present, this attribute defines the language suffix of the template name.

Sub elements

The sub element ui:default has the special task to define the default values for parameters that are used if the parameter has not been passed by the caller (lexical scope), or the parameter cannot be found in the context (dynamic scope). ui:default elements must only occur at the beginning of the template.

The other sub elements may be arbitrary page body elements.

Internationalization

If no xml:lang attribute exists, the template is defined with exactly the name as specified by the name attribute.

If there is a xml:lang attribute, the template gets a compound name. The name attribute is the first part, and the xml:lang attribute is the suffix; the parts are separated by a # character. For example, the template

<ui:template name="foo" xml:lang="en">...</ui:template>

defines the template foo#en.

Example

See the chapter Templates.