'\" t .\" This documentation, which is part of the afnix writing .\" system distribution, is free and can be distributed as .\" long as this copyright notice is left intact. .\" .\" This documentation is distributed in the hope that it .\" will be useful, but without any warranty; without even .\" the implied warranty of merchantability and fitness .\" for a particular purpose. In no event, shall the .\" copyright holder be liable for any direct, incident .\" incidental or special damages arising in any way out .\" of the use of this documentation. .\" .\" Copyright (c) 1999-2017 Amaury Darsch .\" .TH wax 3 2018-07-20 AFNIX "AFNIX Service" .SH NAME wax - web application extension service .SH WEB APPLICATION EXTENSION SERVICE The Web Application Extensionservice is an original implementation that provides the support for low level HTTP transaction as well as high level XHTML page generation. The service combines various modules and provides access to the modern generation of web contents. .PP .B Page service objects .br The XhtmlRootclass is the primary interface to generate xhtml page. The class is derived from the XmlRootclass and the Mimeobject. for this reason, creating a xhtml page is equivalent to add xml nodes to the page. The xhtml version is assumed to be 1.1. .PP .I Page creation .br The XhtmlRootconstructor takes a string argument which is the title page. When the root page is created, a headand bodynodes are automatically created. Once created, it is possible to retrieve the head and body nodes from the root node. The head and body nodes are part of the htmlnode which is automatically instantiated as a XhtmlHtmlobject. The html node can always be retrieved from the root node with the get-childxml method. .sp .nf # create a new xhtml page const page (afnix:wax:XhtmlRoot "AFNIX wax service") # get the head node const head (page:get-head) # get the body node const body (page:get-body) .fi .sp The head and body nodes are part of the htmlnode which is automatically instantiated as a XhtmlHtmlobject. The html node can always be retrieved from the root node with the get-childxml method. The root methods get-headand get-bodyare convenient methods that ease the page design by eliminating the references to the html node. .sp .nf # create a new xhtml page const page (afnix:wax:XhtmlRoot "AFNIX wax service") # get the html node const html (page:get-child "html") # get the head node const head (html:get-head) # get the body node const body (html:get-body) .fi .sp .PP .I Page header .br The XhtmlHeadclass is the xml node that handles the xhtml head. The object is automatically created when calling the XhtmlRootconstructor. During the construction process, the head is automatically set with a title. Once created, the head can be filled with meta information and styles. The add-metamethod is designed to add meta information, while the add-styleadd a link node with a style reference to the head. .sp .nf # add a meta tag head:add-meta "copyright" "© 2000" # add a style path head:add-style "/style.css" .fi .sp The add-metamethod adds a XhtmlMetaobject which is a xml tag node. The first argument is the meta descriptor while the second argument is the meta content. Note that the add-metamethod can be simulated by calling the XhtmlMetaconstructor and then adding the node to the head node. .sp .nf # create a meta node const node (afnix:wax:XhtmlMeta "copyright" "© 2013") # add the node to the head head:add node .fi .sp The add-stylemethod adds a XhtmlStyleobject which is a xml tag node. The string argument is the url style sheet path which gets automatically transformed to the form @import(url). Note that the add-stylemethod can be simulated by calling the XhtmlStyleconstructor and then adding the node to the head node. .sp .nf # create a style node const node (afnix:wax:XhtmlStyle "/style.css") # add the node to the head head:add node .fi .sp .PP .I Page body .br The XhtmlBodyclass is the xml node that handles the xhtml body. The object is automatically created when calling the XhtmlRootconstructor. Once created, the body node can be filled with any valid xhtml node. Since the node are initially xml tag node, it is always possible to create a tag by name and set the attributes and child nodes manually. .sp .nf # create a new xhtml page const page (afnix:wax:XhtmlRoot "AFNIX wax service") # get the body node const body (page:get-body) # add a node body:add-child node .fi .sp .PP .I Page emission .br Since the XhtmlRootobject is a xml root node, the node can be used to write the complete hierarchy. The xml node node provides the writemethod that write a xml tree into a buffer of an output stream. .sp .nf # create a new xhtml page const page (afnix:wax:XhtmlRoot "AFNIX wax service") # write to the output stream page:write .fi .sp Another mechanism for writing the page is to use the fact that the XhtmlRootclass implements also the Mimeinterface. With this in mind, the XhtmlRootcan be used within the HttpReply. This method is particularly useful when writing automated page generation, such like CGI scripts. .sp .nf # create a new xhtml page const page (afnix:wax:XhtmlRoot "AFNIX wax service") # create an http reply object const reply (afnix:wax:HttpReply) # write the page as a mime object reply:add-buffer page # write the result to the output reply:write .fi .sp .PP .B Page design objects .br The wax service moduleis designed to provide several object that ease the task of creating a xhtml page. Such objects range from comment to table. Most of the time, the construction is simple the resulting node only need to be added to the page tree. When it comes to add text, the problem is becoming more subtle and is discussed later in this section. .PP .I Comment node .br Adding a comment is done with the XmlCommentclass which take the comment string in the constructor. Once created, the comment node can be added to the tree. .sp .nf # add a comment to the body node body:add-child ( afnix:xml:XmlComment "this is a comment") .fi .sp .PP .I Node style class .br When the xhtml page is combined with the cascaded style sheet (CSS), the xhtml node tag often uses a classname to refer to a particular style. The class styleis just a node attribute which can be set with the add-attributemethod. However, most of the time, the library provides object which have the style as the first argument in the constructor. For example, the XhtmlDivconstructor take 0 or one argument. With one argument, the string argument is used as the style attribute. .sp .nf # create a xhtml div with a class attribute const div (afnix:wax:XhtmlDiv "nice") # create a xhtml div and set the class manually const div (afnix:wax:XhtmlDiv) div:set-attribute "class" "nice" .fi .sp .PP .I Adding text paragraph .br Adding text to a page is not a trivial task when it comes to deal with text style. By default, a piece of text is stored in the XmlTextnode. Using this node is easy. However, in a programming context, its use can become heavy. For this reason, all xml nodes provide the parsemethod which can be used to add a xml tree to the calling node. When it comes to add text that includes rendering tag, this method is quite handy. .sp .nf # add a text with some piece in italic node:parse "this is a simple method" .fi .sp The XhtmlParanode is the preferred node for adding text to a xhtml page. The node takes optionally the style name in the constructor. A boolean flag can also be used to create an empty paragraph node. .sp .nf # create a paragraph node with a style const p (afnix:wax:XhtmlPara "title") # add some text p:parse "the paragraph text" .fi .sp .PP .I Adding reference .br Adding reference or hyperlink to a page is achieved with the XhtmlRefclass. Most of the time, the object is built with a uri and a text. when the node has been created, the node can be added to the page tree. .sp .nf # create a hyperlink const node ( afnix:wax:XhtmlRef "http://www.afnix.org" "afnix") # add the node in a paragraph p:add-child node .fi .sp .PP .I Formatting elements .br The XhtmlDivand XhtmlHrclasses are the basic formatting xhtml elements. The XhtmlDivis a grouping element and the XhtmlHris a simple horizontal ruler element. Both classes take 0 or one argument which is the style name. .sp .nf # create a div element const div (afnix:wax:XhtmlDiv "menu") # create a ruler element const hr (afnix:wax:XhtmlHr) .fi .sp .PP .B Managing table .br The wax service moduleprovides an extensive support of he xhtml table element. There are basically two strategies for creating a table. One is to use the html elements or the other is to use a print table object and automatically feed the xhtml table. The first method provides a better control while the second one is easier to use. .PP .I The table element .br The XhtmlTableclass is the class that manages xhtml table. As usual, a default style name can be specified in the constructor. Eventually, a default table row and table data default style can also be specified. Such default value are used when creating a new row with the new-rowmethod. .sp .nf # create an element with a default tr and th/td style const tbl (afnix:wax:XhtmlTable "text" "text" "text") # get a new row with a default style const tr (tbl:new-row) .fi .sp In the previous example, a table is created with a default style for the table row. When a new row is created, the default style is used for that row. If there is no default style, the row is created without a style. Note that the new-rowmethod takes also a style argument that overwrites the default one. .PP .I Building the table .br A table is built by adding row and data element into the rows. A row is created with the new-rowmethod or the object can be constructed directly and added to the node with the add-childmethod. The XhtmlTrclass is the table row class. .sp .nf # get a new row with a default style trans tr (tbl:new-row) # create a row directly trans tr (afnix:wax:XhtmlTr "text") .fi .sp When a row has been created, the data can be added to the row. Normally, the new-datamethod is used to create a new table data element. If a default style is defined in the table row, the table data element is built with that style. The new-headmethod can also be used to create table header element. Again, if a default table header style exists in the table row, the element is built with that style. The XhtmlTdclass is the table data class and the XhtmlThclass is the table header class. .sp .nf # get a new data element trans td (tr:new-data) # create new head element trans th (tr:new-head) .fi .sp When the table data node has been created, the parsemethod or the add-childmethod can be called to add other nodes. another method for building the table is to use the add-tablemethod which uses a print table object. In such case, the table rows and data elements are automatically added in the table. .PP .I The table structure .br The table can be designed directly with table rows with table headers and table data elements. Another method, which is more structured is to use the table head, table body and table footer elements. The XhtmlTheadclass is the table head element class. The XhtmlTbodyclass is the table body element class. The XhtmlTfootclass is the table footer element class. These classes behaves exactly like the XhtmlTableand are in fact all derived from the XhtmlTelemclass. .sp .nf # create a xhtml table const table (afnix:wax:XhtmlTable "text") # create a table body const tbody ( afnix:wax:XhtmlTable "text" "text" "text") # add a print tbl in the body tbody:add-table ptbl # add the body to the table table:ad-child tbody .fi .sp A table caption node can also be set with the set-captionmethod. The method simply creates a XhtmlCaptionnode and adds it to the table. The caption text is part of the method call which is used by the caption node constructor. It is also possible to create the caption node by calling the XhtmlCaptionconstructor and adding it to the table with he add-childmethod. .sp .nf # create a xhtml table const table (afnix:wax:XhtmlTable "text") # set a table caption table:set-caption "the afnix table system" .fi .sp The table structure can also be defined with the XhtmlCgrclass which corresponds to the xhtml column group element. The column group element is designed to support the colelement that formats the table column. .sp .nf # create a table const table (afnix:wax:XhtmlTable "text") # set the table with to 100% table:add-attribute "width" "100%" # create a column group table:add-child (const xcgr (afnix:wax:XhtmlCgr)) # add a column with 30% width cgr:add-child (afnix:wax:XhtmlCol "30%") # add a column with 70% width cgr:add-child (afnix:wax:XhtmlCol "70%") .fi .sp .SH WEB APPLICATION EXTENSION SERVICE REFERENCE .PP .B XhtmlRoot .br The XhtmlRootclass 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. .PP .I Predicate .br .sp .RS xhtml-root-p .RE .PP .I Inheritance .br .sp .RS XmlRootMime .RE .PP .I Constructors .br .sp .RS .B XhtmlRoot (String) .br The XhtmlRootconstructor creates a default xhtml page with a head and a body. The head node is set with the string title argument. .RE .PP .I Methods .br .sp .RS .B get-head -> XhtmlHead (none) .br The get-headmethod returns the xhtml head node. .RE .sp .RS .B get-body -> XhtmlBody (none) .br The get-bodymethod returns the xhtml body node. .RE .PP .B XhtmlHtml .br The XhtmlHtmlclass 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. .PP .I Predicate .br .sp .RS xhtml-html-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlHtml (String) .br The XhtmlHtmlconstructor creates a default xhtml html node with a head and a body. The head node is set with the string title argument. .RE .PP .I Methods .br .sp .RS .B get-head -> XhtmlHead (none) .br The get-headmethod returns the xhtml head node. .RE .sp .RS .B get-body -> XhtmlBody (none) .br The get-bodymethod returns the xhtml body node. .RE .PP .B XhtmlHead .br The XhtmlHeadclass 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. .PP .I Predicate .br .sp .RS xhtml-head-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlHead (String) .br The XhtmlHeadconstructor creates a default xhtml head node with a title. The string argument is the head title. .RE .PP .I Methods .br .sp .RS .B add-meta -> none (String String) .br The add-metamethod adds a XhtmlMetanode to the head node. The first argument is the meta descriptor. The second argument is the meta contents. .RE .sp .RS .B add-style -> none (String) .br The add-stylemethod adds a XhtmlLinknode 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. .RE .PP .B XhtmlBody .br The XhtmlBodyclass 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. .PP .I Predicate .br .sp .RS xhtml-body-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlBody (none) .br The XhtmlBodyconstructor creates a default xhtml body node. .RE .PP .B XhtmlTitle .br The XhtmlTitleclass is a xhtml title node used in the head node. .PP .I Predicate .br .sp .RS xhtml-title-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlTitle (String) .br The XhtmlTitleconstructor creates a xhtml title node. The string argument is the title value. The title node is designed for the XhtmlHeadclass. .RE .PP .I Methods .br .sp .RS .B set-title -> none (String) .br The set-titlemethod set the node title by value. .RE .PP .B XhtmlMeta .br The XhtmlMetaclass 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. .PP .I Predicate .br .sp .RS xhtml-meta-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlMeta (String String) .br The XhtmlMetaconstructor 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. .RE .PP .B XhtmlLink .br The XhtmlLinkclass 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. .PP .I Predicate .br .sp .RS xhtml-link-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlLink (String) .br The XhtmlLinkconstructor creates a xhtml link node by reference. The first argument is the link reference. .RE .sp .RS .B XhtmlLink (String String) .br The XhtmlLinkconstructor 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. .RE .sp .RS .B XhtmlLink (String String String) .br The XhtmlLinkconstructor 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. .RE .PP .B XhtmlStyle .br The XhtmlStyleclass 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. .PP .I Predicate .br .sp .RS xhtml-style-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlStyle (String) .br The XhtmlStyleconstructor creates a xhtml style node with a url path. The string argument is the url path of the style sheet file. .RE .PP .B XhtmlScript .br The XhtmlScriptclass 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. .PP .I Predicate .br .sp .RS xhtml-script-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlScript (String) .br The XhtmlScriptconstructor creates a xhtml script node with a type. The string argument is the mime type string such like 'text/javascript'. .RE .sp .RS .B XhtmlScript (String Boolean) .br The XhtmlScriptconstructor creates a xhtml script node with a type and a CDATA 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. .RE .sp .RS .B XhtmlScript (String String) .br The XhtmlScriptconstructor 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. .RE .PP .B XhtmlPara .br The XhtmlParaclass 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. .PP .I Predicate .br .sp .RS xhtml-para-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlPara (none) .br The XhtmlParaconstructor creates a default xhtml paragraph node. .RE .sp .RS .B XhtmlPara (String) .br The XhtmlParaconstructor creates a xhtml paragraph node with a style. The string argument is the style name. .RE .sp .RS .B XhtmlPara (Boolean) .br The XhtmlParaconstructor creates an empty xhtml paragraph if the boolean argument is true. .RE .PP .B XhtmlEmph .br The XhtmlEmphclass is a xhtml emphasize node used in the body element of a xhtml page. The emphasize node can be created with a style name. .PP .I Predicate .br .sp .RS xhtml-emph-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlEmph (none) .br The XhtmlEmphconstructor creates a default xhtml emphasize node. .RE .sp .RS .B XhtmlEmph (String) .br The Xhtmlemphconstructor creates a xhtml emphasize node with a style. The string argument is the style name. .RE .PP .B XhtmlRef .br The XhtmlRefclass 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. .PP .I Predicate .br .sp .RS xhtml-ref-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlRef (none) .br The XhtmlRefconstructor creates a default xhtml reference node. .RE .sp .RS .B XhtmlRef (String) .br The XhtmlRefconstructor creates a xhtml reference node with a uri. The string argument is the uri to use. .RE .sp .RS .B XhtmlRef (String String) .br The XhtmlRefconstructor 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. .RE .PP .B XhtmlImg .br The XhtmlImgclass 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. .PP .I Predicate .br .sp .RS xhtml-img-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlImg (String String) .br The XhtmlImgconstructor creates a xhtml image node by source and alternate name. The first argument is the image uri. The second argument is the alternate name. .RE .PP .I Methods .br .sp .RS .B set-width -> none (String) .br The set-widthmethod set the image width attribute. .RE .sp .RS .B set-height -> none (String) .br The set-heightmethod set the image height attribute. .RE .sp .RS .B set-geometry -> none (String) .br The set-geometrymethod set the image width and height attribute in one call. .RE .PP .B XhtmlDiv .br The XhtmlDivclass is a xhtml divnode used in the body element of a xhtml page. The divnode is a xhtml grouping element. .PP .I Predicate .br .sp .RS xhtml-div-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlDiv (none) .br The XhtmlDivconstructor creates a default xhtml div node. .RE .sp .RS .B XhtmlDiv (String) .br The XhtmlDivconstructor creates a xhtml div node with a style. The string argument is the style name. .RE .PP .B XhtmlPre .br The XhtmlPreclass is a xhtml prenode used in the body element of a xhtml page. The prenode is a xhtml formatting element. .PP .I Predicate .br .sp .RS xhtml-pre-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlPre (none) .br The XhtmlPreconstructor creates a default xhtml pre node. .RE .sp .RS .B XhtmlPre (String) .br The XhtmlPreconstructor creates a xhtml pre node with a style. The string argument is the style name. .RE .PP .B XhtmlHr .br The XhtmlHrclass is a xhtml hrnode used in the body element of a xhtml page. The hrnode is a xhtml horizontal ruler element. .PP .I Predicate .br .sp .RS xhtml-hr-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlHr (none) .br The XhtmlHrconstructor creates a default xhtml hr node. .RE .sp .RS .B XhtmlHr (String) .br The XhtmlHrconstructor creates a xhtml hr node with a style. The string argument is the style name. .RE .PP .B XhtmlCgr .br The XhtmlCgrclass is a xhtml column group node used in the table element. The column group is designed to hold the column definition bound by the XhtmlColclass. .PP .I Predicate .br .sp .RS xhtml-cgr-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlCgr (none) .br The XhtmlCgrconstructor creates a default xhtml colgroupnode. .RE .PP .B XhtmlCol .br The XhtmlColclass is a xhtml column node used in the table column group element. .PP .I Predicate .br .sp .RS xhtml-col-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlCol (none) .br The XhtmlColconstructor creates a default xhtml colnode. .RE .sp .RS .B XhtmlCol (String) .br The XhtmlColconstructor creates a xhtml colnode with a string width argument. The argument is the widthattribute value. .RE .PP .B XhtmlTh .br The XhtmlThclass is a xhtml thnode used in the table row. The object can be built with a style name. .PP .I Predicate .br .sp .RS xhtml-th-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlTh (none) .br The XhtmlThconstructor creates a default xhtml th node. .RE .sp .RS .B XhtmlTh (String) .br The XhtmlThconstructor creates a xhtml th node with a style. The string argument is the style name. .RE .PP .B XhtmlTd .br The XhtmlTdclass is a xhtml tdnode used in the table row. The object can be built with a style name. .PP .I Predicate .br .sp .RS xhtml-td-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlTd (none) .br The XhtmlTdconstructor creates a default xhtml td node. .RE .sp .RS .B XhtmlTd (String) .br The XhtmlTdconstructor creates a xhtml td node with a style. The string argument is the style name. .RE .PP .B XhtmlTr .br The XhtmlTrclass is a xhtml trnode used in the table node. The table row node is designed to accumulate table head or table data nodes. .PP .I Predicate .br .sp .RS xhtml-tr-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlTr (none) .br The XhtmlTrconstructor creates a default xhtml tr node. .RE .sp .RS .B XhtmlTr (String) .br The XhtmlTrconstructor creates a xhtml tr node with a style. The string argument is the style name. .RE .sp .RS .B XhtmlTr (String String) .br The XhtmlTrconstructor 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. .RE .PP .I Methods .br .sp .RS .B new-head -> XhtmlTh (none | String) .br The new-headmethod returns a new table head data object. Without argument, a default XhtmlThobject is created. With a string argument, the XhtmlThobject is constructed with a style name. .RE .sp .RS .B new-data -> XhtmlTd (none | String) .br The new-datamethod returns a new table data object. Without argument, a default XhtmlTdobject is created. With a string argument, the XhtmlTdobject is constructed with a style name. .RE .sp .RS .B set-head-class -> none (String) .br The set-head-classmethod sets the default table head style. The default style is use with the new-headmethod. .RE .sp .RS .B set-data-class -> none (String) .br The set-data-classmethod sets the default table data style. The default style is use with the new-datamethod. .RE .sp .RS .B set-xdef-class -> none (String) .br The set-xdef-classmethod sets the default table head and data style. The default style is use with the new-headand new-datamethods. This method combines the set-head-classand the set-head-class .RE .PP .B XhtmlTelem .br The XhtmlTelemclass 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. .PP .I Predicate .br .sp .RS xhtml-telem-p .RE .PP .I Inheritance .br .sp .RS XmlTag .RE .PP .I Methods .br .sp .RS .B new-row -> XhtmlTr (none | String) .br The new-rowmethod returns a new table row object. Without argument, a default XhtmlTrobject is created. With a string argument, the XhtmlTrobject is constructed with a style name. .RE .sp .RS .B add-table -> none (PrintTable [Boolean]) .br The add-tablemethod adds a print table into the table element by adding automatically the row and the associated formatting information such like the data direction. The optional second argument controls whether or not the table tag shall be used to build reference node for the table elements. .RE .sp .RS .B set-xrow-class -> none (String) .br The set-xrow-classmethod sets the default table row data style. The default row style is use with the new-rowmethod. .RE .sp .RS .B set-xdef-class -> none (String) .br The set-xdef-classmethod sets the default table head and data style. The default style is use with the new-rowmethod to set the table head and data default style. .RE .PP .B XhtmlThead .br The XhtmlTheadclass 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. .PP .I Predicate .br .sp .RS xhtml-thead-p .RE .PP .I Inheritance .br .sp .RS XhtmlTelem .RE .PP .I Constructors .br .sp .RS .B XhtmlThead (none) .br The XhtmlTheadconstructor creates a default xhtml table head node. .RE .sp .RS .B XhtmlThead (String) .br The XhtmlTheadconstructor creates a xhtml table head node with a style. The string argument is the style name. .RE .sp .RS .B XhtmlThead (String String) .br The XhtmlTheadconstructor 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. .RE .sp .RS .B XhtmlThead (String String String) .br The XhtmlTheadconstructor 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. .RE .PP .B XhtmlTbody .br The XhtmlTbodyclass 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. .PP .I Predicate .br .sp .RS xhtml-tbody-p .RE .PP .I Inheritance .br .sp .RS XhtmlTelem .RE .PP .I Constructors .br .sp .RS .B XhtmlTbody (none) .br The XhtmlTbodyconstructor creates a default xhtml table body node. .RE .sp .RS .B XhtmlTbody (String) .br The XhtmlTbodyconstructor creates a xhtml table body node with a style. The string argument is the style name. .RE .sp .RS .B XhtmlTbody (String String) .br The XhtmlTbodyconstructor 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. .RE .sp .RS .B XhtmlTbody (String String String) .br The XhtmlTbodyconstructor 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. .RE .PP .B XhtmlTfoot .br The XhtmlTfootclass 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. .PP .I Predicate .br .sp .RS xhtml-tfoot-p .RE .PP .I Inheritance .br .sp .RS XhtmlTelem .RE .PP .I Constructors .br .sp .RS .B XhtmlTfoot (none) .br The XhtmlTfootconstructor creates a default xhtml table foot node. .RE .sp .RS .B XhtmlTfoot (String) .br The XhtmlTfootconstructor creates a xhtml table foot node with a style. The string argument is the style name. .RE .sp .RS .B XhtmlTfoot (String String) .br The XhtmlTfootconstructor 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. .RE .sp .RS .B XhtmlTfoot (String String String) .br The XhtmlTfootconstructor 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. .RE .PP .B XhtmlTable .br The XhtmlTableclass 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. .PP .I Predicate .br .sp .RS xhtml-table-p .RE .PP .I Inheritance .br .sp .RS XhtmlTelem .RE .PP .I Constructors .br .sp .RS .B XhtmlTable (none) .br The XhtmlTableconstructor creates a default xhtml table foot node. .RE .sp .RS .B XhtmlTable (String) .br The XhtmlTableconstructor creates a xhtml table foot node with a style. The string argument is the style name. .RE .sp .RS .B XhtmlTable (String String) .br The XhtmlTableconstructor 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. .RE .sp .RS .B XhtmlTable (String String String) .br The XhtmlTableconstructor 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. .RE .PP .I Methods .br .sp .RS .B set-caption -> none (String) .br The set-captionmethod sets the table caption. A new XhtmlCaptionnode is automatically added to the table tree during this method call. .RE .PP .B XmlMime .br The XmlMimeclass is a generic xml mime document class. The class is used to construct a mime version of a xml document which can be obtained from a file name, or an input stream. By default, the mime type 'application/xml'. .PP .I Predicate .br .sp .RS xml-mime-p .RE .PP .I Inheritance .br .sp .RS XmlDocumentMime .RE .PP .I Constructors .br .sp .RS .B XmlMime (none) .br The XmlMimeconstructor creates a default xml mime document. .RE .sp .RS .B XmlMime (String) .br The XmlMimeconstructor creates a xml mime document by parsing a file. The file name is the string argument. .RE .sp .RS .B XmlMime (String InputStream) .br The XmlMimeconstructor creates a xml mime document by name and by parsing the input stream. The first argument is the xml document name. The second argument is the input stream to parse. .RE .PP .B XhtmlMime .br The XhtmlMimeclass is a generic xhtml mime document class. The class is used to construct a mime version of a xhtml document which can be obtained from a file name, or an input stream. By default, the mime type 'application/xhtml+xml'. .PP .I Predicate .br .sp .RS xhtml-mime-p .RE .PP .I Inheritance .br .sp .RS XmlMime .RE .PP .I Constructors .br .sp .RS .B XhtmlMime (none) .br The XhtmlMimeconstructor creates a default xhtml mime document. .RE .sp .RS .B XhtmlMime (String) .br The XhtmlMimeconstructor creates a xhtml mime document by parsing a file. The file name is the string argument. .RE .sp .RS .B XhtmlMime (String InputStream) .br The XhtmlMimeconstructor creates a xhtml mime document by name and by parsing the input stream. The first argument is the xhtml document name. The second argument is the input stream to parse. .RE .PP .B XhtmlForm .br The XhtmlFormclass is a generic xhtml form object. A form is defined by an action and a method. When the form is created, it is appropriate to add other xhtml objects. .PP .I Predicate .br .sp .RS xhtml-form-p .RE .PP .I Inheritance .br .sp .RS XhtmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlForm (String String) .br The XhtmlFormconstructor creates a xhtml form by action and method. The first argument is the uri path for the action while the second argument is the method to use for the action. .RE .PP .B XhtmlText .br The XhtmlTextclass is a generic xhtml input text object. An input text is a form element which is used to capture text in a field. The text value is attached with the name attribute. .PP .I Predicate .br .sp .RS xhtml-text-p .RE .PP .I Inheritance .br .sp .RS XhtmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlText (String) .br The XhtmlTextconstructor creates a xhtml input text by name. .RE .sp .RS .B XhtmlText (String String) .br The XhtmlTextconstructor creates a xhtml input text by name and size. The first argument is the input text name and the second argument is the text field size. .RE .PP .I Methods .br .sp .RS .B set-size -> none (String) .br The set-sizemethod sets the input text size. .RE .PP .B XhtmlSubmit .br The XhtmlSubmitclass is a generic xhtml input submit object. An input submit object is a button which is used inside a form generally as a condition to activate the form. .PP .I Predicate .br .sp .RS xhtml-submit-p .RE .PP .I Inheritance .br .sp .RS XhtmlTag .RE .PP .I Constructors .br .sp .RS .B XhtmlSubmit (String) .br The XhtmlSubmitconstructor creates a xhtml submit button by value. .RE .sp .RS .B XhtmlText (String String) .br The XhtmlTextconstructor creates a xhtml submit button by value and size. The first argument is the input submit value and the second argument is the submit size. .RE .PP .I Methods .br .sp .RS .B set-size -> none (String) .br The set-sizemethod sets the submit button size. .RE