morphis logo morphis | wax   
wax manual
wax manual
 

Overview

Architecture

Structure
   Documents
   Navigation
   Forms
   Animation

Devices
   device.xml

DIS
   wax syntax
   text selection
   image selection
   text and image xml

Application
   Configuration
   Servlet
   Filters

WAX Documents

Simple wax document

<wax:wax xmlns:wax="http://www.morphis.org/wax" version="1.0">
    <wax:doc>
        <wax:block>
            <wax:p>Hello World</wax:p>
        </wax:block>
    </wax:doc>
</wax:wax>

This example is not quite large enough to fully show the structure of complex WAX documents but it is a good starting point. First notice that wax:block holds the content of the document and secondly that wax:doc holds the wax:blocks. This is an important note in constructing WAX documents; one wax:doc contains many wax:blocks, but in most cases only one wax:block is seen on the client's browser at one time. (Some clients can see all of the wax:blocks at once, but most do not.)

Figure 1 represents a large WAX document and how the content would be display on most clients. Each subsection represents one wax:block and the larger section represents the wax:doc that contains each of the wax:blocks. The WAX source for this example is below.

Fig 1

<wax:wax xmlns:wax="http://www.morphis.org/wax" version="1.0">
    <wax:doc>
        <wax:block id="first">
            <wax:button keytype="accept" type="go" label="Next"
                        href="#next"/>
            <wax:p>Hello World</wax:p>
        </wax:block>
        <wax:block id="next">
            <wax:button keytype="accept" type="go" label="Last"
                        href="#last"/>
            <wax:p>This is the next wax:block</wax:p>
        </wax:block>
        <wax:block id="last">
            <wax:button keytype="accept" type="go" label="First"
                        href="#first"/>
            <wax:p>This is the last wax:block</wax:p>
        </wax:block>
    </wax:doc>
</wax:wax>

But wait there's more, wax:docs can contain more than just wax:blocks, there is also wax:form, wax:formblock, and wax:animation. The first two will be discussed in more detail in the Forms section. wax:formblocks can do everything the regular wax:blocks can do, plus a little more, specifically they can contain form elements wax:binarychoice, wax:choice, and wax:entry. wax:animation as its name suggests, allows for the creation of animated frames. This means wax:formblocks, wax:blocks, and wax:animations are all at level in the WAX document structure sense.

morphis SourceForge Logo