XFDL: The Extensible Forms Description Language 
John Boyer


Listing One
<?xml version="1.0"?>
<XFDL version="4.0.0">
    <!-- Form Global Options -->
    <!-- One or more pages -->
</XFDL>

Listing Two
<?xml version="1.0"?>
<XFDL version="4.0.0">
    <!-- Form Global Options -->
    <page sid="PAGE1">
        <!-- Page Global Options -->
        <label sid="TITLE">
            <!-- Options -->
        </label>
        <field sid="HOURS">
            <!-- Options -->
        </field>
        <field sid="RATE">
            <!-- Options -->
        </field>
        <field sid="WEEKLYCHECK">
            <!-- Options -->
        </field>
    </page>
</XFDL>


Listing Three
<label sid="TITLE">
    <value>Salary Calculator</value>
    <fontinfo content="array">
        <ae>Times</ae>
        <ae>24</ae>
        <ae>bold</ae>
    </fontinfo>
    <size content="array">
        <width>50</width>
        <height>1</height>
    </size>
    <justify>center</justify>
</label>


Listing Four
<field sid="HOURS">
    <label>Number of Hours:</label>
    <value>40</value>
    <format content="array">
        <ae>integer</ae>
        <range content="array">
            <ae>1</ae>
            <ae>99</ae>
        </range>
    </format>
</field>
<field sid="RATE">
    <label>Pay Rate:</label>
    <value>$7.75</value>
    <format content="array">
        <ae>dollar</ae>
        <ae>add_ds</ae>
    </format>
</field>


Listing Five
<field sid="WEEKLYCHECK">
    <editstate>readonly</editstate>
    <value content="compute">
        <cval>$310.00</cval>
        <compute>
            HOURS.value*RATE.value
        </compute>      
    </value>
    <format content="array">
        <ae>dollar</ae>
        <ae>add_ds</ae>
    </format>
</field>


Listing Six
<compute>
<![CDATA[
  HOURS.value <= "40"
  ? HOURS.value*RATE.value
  : "40"*RATE.value + 
    (HOURS.value-"40")*"1.5"*RATE.value
]]>
</compute>      










2


