# Web Application Extension service reference

This appendix is a reference of the web application extension (wax) service.

## Web application extension

Symbol | Description
--- | ---
afnix-wax | module
afnix:wax | nameset

XhtmlRoot

The `XhtmlRoot` class is a xml root node used for the design of a xhtml document page. At construction, the root node is initialized with a default xml processing instruction, and xhmtl node with head and body The head and body nodes can be used to add more nodes in order to build the document. The construction argument is the page title.

xhtml-root-p
XmlRoot
Mime
XhtmlRoot
String

The `XhtmlRoot` constructor creates a default xhtml page with a head and a body. The head node is set with the string title argument.

get-head
XhtmlHead
none

The `get-head` method returns the xhtml head node.

get-body
XhtmlBody
none

The `get-body` method returns the xhtml body node.

XhtmlHtml

The `XhtmlHtml` class is a xhtml html node used for the design of a xhtml document page. At construction, the html node is initialized with a head node and a body node. Because a valid xhtml document must contain a title the constructor takes at least a title argument.

xhtml-html-p
XmlTag
XhtmlHtml
String

The `XhtmlHtml` constructor creates a default xhtml html node with a head and a body. The head node is set with the string title argument.

get-head
XhtmlHead
none

The `get-head` method returns the xhtml head node.

get-body
XhtmlBody
none

The `get-body` method returns the xhtml body node.

XhtmlHead

The `XhtmlHead` class is a xhtml head node used for the design of a xhtml document page. At construction, the head node is initialized with a with a title node. The class is designed to hold as well meta nodes and style nodes.

xhtml-head-p
XmlTag
XhtmlHead
String

The `XhtmlHead` constructor creates a default xhtml head node with a title. The string argument is the head title.

add-meta
none
String String

The `add-meta` method adds a `XhtmlMeta` node to the head node. The first argument is the meta descriptor. The second argument is the meta contents.

add-style
none
String

The `add-style` method adds a `XhtmlLink` node to the head node. The string argument is the style url path. The link node is automatically configured to reference a 'text/css' mime type.

XhtmlBody

The `XhtmlBody` class is a xhtml body node used for the design of a xhtml document page. The class is designed to be filled with other xhtml nodes.

xhtml-body-p
XmlTag
XhtmlBody
none

The `XhtmlBody` constructor creates a default xhtml body node.

XhtmlTitle

The `XhtmlTitle` class is a xhtml title node used in the head node.

xhtml-title-p
XmlTag
XhtmlTitle
String

The `XhtmlTitle` constructor creates a xhtml title node. The string argument is the title value. The title node is designed for the `XhtmlHead` class.

set-title
none
String

The `set-title` method set the node title by value.

XhtmlMeta

The `XhtmlMeta` class is a xhtml meta node used in the head node. The meta data node is an empty node with two attributes which are the descriptor and content value. The meta data is stored internally as a xml attribute.

xhtml-meta-p
XmlTag
XhtmlMeta
String String

The `XhtmlMeta` constructor creates a xhtml meta node with a descriptor name and content value. The first argument is he descriptor name which is used as the node attribute name. The second argument is the content vale which is the attribute value.

XhtmlLink

The `XhtmlLink` class is a xhtml link node used in the head node. The link node is an empty node with several attributes. The most important one is the 'href' attribute that specifies the link uri. Other attributes like 'type' or 'rel' can also be set at construction.

xhtml-link-p
XmlTag
XhtmlLink
String

The `XhtmlLink` constructor creates a xhtml link node by reference. The first argument is the link reference.

XhtmlLink
String String

The `XhtmlLink` constructor creates a xhtml link node by reference and type. The first argument is the link reference. The second argument is the link type. The link type is defined as a mime type.

XhtmlLink
String String String

The `XhtmlLink` constructor creates a xhtml link node by reference, type and relation. The first argument is the link reference. The second argument is the link type. The link type is defined as a mime type. The third argument is the link relation.

XhtmlStyle

The `XhtmlStyle` class is a xhtml style node used in the head node. The style node is built with a xml text node that holds the formatted url string.

xhtml-style-p
XmlTag
XhtmlStyle
String

The `XhtmlStyle` constructor creates a xhtml style node with a url path. The string argument is the url path of the style sheet file.

XhtmlScript

The `XhtmlScript` class is a xhtml script node used in the head and body node. The script node is built with a xml tag node that holds the script content. Sometimes it is recommended to place the script inside a cdata node that is stored as a child node of the script node. A boolean flag controls this feature at construction.

xhtml-script-p
XmlTag
XhtmlScript
String

The `XhtmlScript` constructor creates a xhtml script node with a type. The string argument is the mime type string such like 'text/javascript'.

XhtmlScript
String Boolean

The `XhtmlScript` constructor creates a xhtml script node with a type and a cadat node control flag. The first argument is the mime type string such like 'text/javascript'. The second argument is the cdata node control flag. If the flag is true, all scripts attached to the node are placed into a 'CDATA' node.

XhtmlScript
String String

The `XhtmlScript` constructor creates a xhtml script node with a type and a url. The first argument is the mime type string such like 'text/javascript'. The second argument is the script source url.

XhtmlPara

The `XhtmlPara` class is a xhtml paragraph node used in the body element of a xhtml page. The paragraph node can be created with a style name or as an empty node.

xhtml-para-p
XmlTag
XhtmlPara
none

The `XhtmlPara` constructor creates a default xhtml paragraph node.

XhtmlPara
String

The `XhtmlPara` constructor creates a xhtml paragraph node with a style. The string argument is the style name.

XhtmlPara
Boolean

The `XhtmlPara` constructor creates an empty xhtml paragraph if the boolean argument is true.

XhtmlEmph

The `XhtmlEmph` class is a xhtml emphasize node used in the body element of a xhtml page. The emphasize node can be created with a style name.

xhtml-emph-p
XmlTag
XhtmlEmph
none

The `XhtmlEmph` constructor creates a default xhtml emphasize node.

XhtmlEmph
String

The `Xhtmlemph` constructor creates a xhtml emphasize node with a style. The string argument is the style name.

XhtmlRef

The `XhtmlRef` class is a xhtml reference node used in the body element of a xhtml page. The node can be used to create hyperlink that references object by a uri.

xhtml-ref-p
XmlTag
XhtmlRef
none

The `XhtmlRef` constructor creates a default xhtml reference node.

XhtmlRef
String

The `XhtmlRef` constructor creates a xhtml reference node with a uri. The string argument is the uri to use.

XhtmlRef
String String

The `XhtmlRef` constructor creates a xhtml reference node with a uri and a reference text. The first argument is the uri. The second argument is the reference text.

XhtmlImg

The `XhtmlImg` class is a xhtml image node used in the html body. The image node is an empty node with several attributes including the image source, the image width and height and an alternate string.

xhtml-img-p
XmlTag
XhtmlImg
String String

The `XhtmlImg` constructor creates a xhtml image node by source and alternate name. The first argument is the image uri. The second argument is the alternate name.

set-width
none
String

The `set-width` method set the image width attribute.

set-height
none
String

The `set-height` method set the image height attribute.

set-geometry
none
String

The `set-geometry` method set the image width and height attribute in one call.

XhtmlDiv

The `XhtmlDiv` class is a xhtml div node used in the body element of a xhtml page. The div node is a xhtml grouping element.

xhtml-div-p
XmlTag
XhtmlDiv
none

The `XhtmlDiv` constructor creates a default xhtml div node.

XhtmlDiv
String

The `XhtmlDiv` constructor creates a xhtml div node with a style. The string argument is the style name.

XhtmlPre

The `XhtmlPre` class is a xhtml pre node used in the body element of a xhtml page. The pre node is a xhtml formatting element.

xhtml-pre-p
XmlTag
XhtmlPre
none

The `XhtmlPre` constructor creates a default xhtml pre node.

XhtmlPre
String

The `XhtmlPre` constructor creates a xhtml pre node with a style. The string argument is the style name.

XhtmlHr

The `XhtmlHr` class is a xhtml hr node used in the body element of a xhtml page. The hr node is a xhtml horizontal ruler element.

xhtml-hr-p
XmlTag
XhtmlHr
none

The `XhtmlHr` constructor creates a default xhtml hr node.

XhtmlHr
String

The `XhtmlHr` constructor creates a xhtml hr node with a style. The string argument is the style name.

XhtmlCgr

The `XhtmlCgr` class is a xhtml column group node used in the table element. The column group is designed to hold the column definition bound by the `XhtmlCol` class.

xhtml-cgr-p
XmlTag
XhtmlCgr
none

The `XhtmlCgr` constructor creates a default xhtml colgroup node.

XhtmlCol

The `XhtmlCol` class is a xhtml column node used in the table column group element.

xhtml-col-p
XmlTag
XhtmlCol
none

The `XhtmlCol` constructor creates a default xhtml col node.

XhtmlCol
String

The `XhtmlCol` constructor creates a xhtml col node with a string width argument. The argument is the width attribute value.

XhtmlTh

The `XhtmlTh` class is a xhtml th node used in the table row. The object can be built with a style name.

xhtml-th-p
XmlTag
XhtmlTh
none

The `XhtmlTh` constructor creates a default xhtml th node.

XhtmlTh
String

The `XhtmlTh` constructor creates a xhtml th node with a style. The string argument is the style name.

XhtmlTd

The `XhtmlTd` class is a xhtml td node used in the table row. The object can be built with a style name.

xhtml-td-p
XmlTag
XhtmlTd
none

The `XhtmlTd` constructor creates a default xhtml td node.

XhtmlTd
String

The `XhtmlTd` constructor creates a xhtml td node with a style. The string argument is the style name.

XhtmlTr

The `XhtmlTr` class is a xhtml tr node used in the table node. The table row node is designed to accumulate table head or table data nodes.

xhtml-tr-p
XmlTag
XhtmlTr
none

The `XhtmlTr` constructor creates a default xhtml tr node.

XhtmlTr
String

The `XhtmlTr` constructor creates a xhtml tr node with a style. The string argument is the style name.

XhtmlTr
String String

The `XhtmlTr` constructor creates a xhtml tr node with a style and a default table data style. The string argument is the table row style name. The second argument is the default table data style.

new-head
XhtmlTh
none | String

The `new-head` method returns a new table head data object. Without argument, a default `XhtmlTh` object is created. With a string argument, the `XhtmlTh` object is constructed with a style name.

new-data
XhtmlTd
none | String

The `new-data` method returns a new table data object. Without argument, a default `XhtmlTd` object is created. With a string argument, the `XhtmlTd` object is constructed with a style name.

set-head-class
none
String

The `set-head-class` method sets the default table head style. The default style is use with the `new-head` method.

set-data-class
none
String

The `set-data-class` method sets the default table data style. The default style is use with the `new-data` method.

set-xdef-class
none
String

The `set-xdef-class` method sets the default table head and data style. The default style is use with the `new-head` and `new-data` methods. This method combines the `set-head-class` and the `set-head-class`

XhtmlTelem

The `XhtmlTelem` class is an abstract class that implements the node behavior for the table head, body, foot and table elements. The table element node is designed to accumulate table row nodes. This class cannot be constructed directly.

xhtml-telem-p
XmlTag
new-row
XhtmlTr
none | String

The `new-row` method returns a new table row object. Without argument, a default `XhtmlTr` object is created. With a string argument, the `XhtmlTr` object is constructed with a style name.

add-table
none
PrintTable

The `add-table` method adds a print table into the table element by adding automatically the row and the associated formatting information such like the data direction.

set-xrow-class
none
String

The `set-xrow-class` method sets the default table row data style. The default row style is use with the `new-row` method.

set-xdef-class
none
String

The `set-xdef-class` method sets the default table head and data style. The default style is use with the `new-row` method to set the table head and data default style.

XhtmlThead

The `XhtmlThead` class is a xhtml thead node. The table head node is designed to accumulate table rows nodes. The class acts almost like the xhtml table class.

xhtml-thead-p
XhtmlTelem
XhtmlThead
none

The `XhtmlThead` constructor creates a default xhtml table head node.

XhtmlThead
String

The `XhtmlThead` constructor creates a xhtml table head node with a style. The string argument is the style name.

XhtmlThead
String String

The `XhtmlThead` constructor creates a xhtml table head node with a style and a default table row style. The string argument is the table head style name. The second argument is the default table row style.

XhtmlThead
String String String

The `XhtmlThead` constructor creates a xhtml table head node with a style, a default table row style and a default table data style. The string argument is the table head style name. The second argument is the default table row style. The third argument is the table data style.

XhtmlTbody

The `XhtmlTbody` class is a xhtml tbody node. The table body node is designed to accumulate table rows nodes. The class acts almost like the xhtml table class.

xhtml-tbody-p
XhtmlTelem
XhtmlTbody
none

The `XhtmlTbody` constructor creates a default xhtml table body node.

XhtmlTbody
String

The `XhtmlTbody` constructor creates a xhtml table body node with a style. The string argument is the style name.

XhtmlTbody
String String

The `XhtmlTbody` constructor creates a xhtml table body node with a style and a default table row style. The string argument is the table body style name. The second argument is the default table row style.

XhtmlTbody
String String String

The `XhtmlTbody` constructor creates a xhtml table body node with a style, a default table row style and a default table data style. The string argument is the table body style name. The second argument is the default table row style. The third argument is the table data style.

XhtmlTfoot

The `XhtmlTfoot` class is a xhtml tfoot node. The table foot node is designed to accumulate table rows nodes. The class acts almost like the xhtml table class.

xhtml-tfoot-p
XhtmlTelem
XhtmlTfoot
none

The `XhtmlTfoot` constructor creates a default xhtml table foot node.

XhtmlTfoot
String

The `XhtmlTfoot` constructor creates a xhtml table foot node with a style. The string argument is the style name.

XhtmlTfoot
String String

The `XhtmlTfoot` constructor creates a xhtml table foot node with a style and a default table row style. The string argument is the table foot style name. The second argument is the default table row style.

XhtmlTfoot
String String String

The `XhtmlTfoot` constructor creates a xhtml table foot node with a style, a default table row style and a default table data style. The string argument is the table foot style name. The second argument is the default table row style. The third argument is the table data style.

XhtmlTable

The `XhtmlTable` class is a xhtml table node. The table node is designed to accumulate table row nodes or column group nodes. The table can also be designed with a table head, body and foot nodes.

xhtml-table-p
XhtmlTelem
XhtmlTable
none

The `XhtmlTable` constructor creates a default xhtml table foot node.

XhtmlTable
String

The `XhtmlTable` constructor creates a xhtml table foot node with a style. The string argument is the style name.

XhtmlTable
String String

The `XhtmlTable` constructor creates a xhtml table foot node with a style and a default table row style. The string argument is the table foot style name. The second argument is the default table row style.

XhtmlTable
String String String

The `XhtmlTable` constructor creates a xhtml table foot node with a style, a default table row style and a default table data style. The string argument is the table foot style name. The second argument is the default table row style. The third argument is the table data style.

set-caption
none
String

The `set-caption` method sets the table caption. A new `XhtmlCaption` node is automatically added to the table tree during this method call.