Top-level structure

An XFDL form is an XML 1.0 document whose root element tag is XFDL. This element must be in the XFDL namespace, a URI that includes the major and minor version of XFDL. For example:
[1]			<XFDL xmlns="http://www.ibm.com/xmlns/prod/XFDL/8.0"> ... </XFDL>

The XFDL element may contain many namespace attributes. By convention, the XFDL namespace is declared to be the default and it is also assigned to the prefix 'xfdl'. Other prefixes that are likely to appear include the 'xforms' prefix bound to the XForms 1.0 namespace, the 'xsd' prefix and possibly the 'xsi' prefix from XML schema, the 'ev' prefix for XML events, and namespace prefixes for the data vocabulary being processed by the XFDL form.

The XFDL element must contain a <globalpage> element as the first child element, followed by one or more <page> elements.

[2]			<!ELEMENT XFDL (globalpage, page+)>

The <globalpage> element must contain a single <global> element, which can contain zero or more option elements. These are referred to as form global options; they typically contain information applicable to the whole form or default settings for options appearing in the element content of pages. The <globalpage> and <global> elements must contain an attribute called sid which must be set to the value global. Although the attribute has a fixed value, it is still required because XFDL processors must be able to clearly identify global objects by sid even in the presence of interspersed custom elements in non-XFDL namespaces.

[3]			<!ELEMENT XFDL (globalpage, page+)>
[4]			<!ELEMENT global (%options;*)>
[5]			<!ATTLIST globalpage sid CDATA #REQUIRED #FIXED "global">
   
   			<!-- This rule is only intended to communicate the restriction with 
   			DTD-like notation; DTDs don't allow required and fixed (XML Schema does) 
   -->

A <page> element contains a <global> element followed by zero or more 'item' elements. The options in the page's global element typically contain information applicable to the whole page or default settings for options appearing within element content of items. The page global options take precedence over form global options. A page is also required to have a 'sid' attribute, which provides an identifier that is unique among all <page> elements (sid is short for scope identifier). The 'sid' attribute value must not be the word 'global' and is otherwise a letter followed by any combination of zero or more letters, digits and underscores.

[6]			<!ELEMENT page (global, %items;*)>
[7]			<!ATTLIST page sid CDATA #REQUIRED>
[8]			sid ::= (Letter | Special) (Letter | Special | Digit | '_')* - 
   			('global')
[9]			Letter ::= [A-Z] | [a-z]
[10]			Digit ::= [0-9]
[11]			Special ::= [0x00C0-0x00FF] - (0x00D7 | 0x00F7)

The intention of using multiple pages in a form is to show the user one page at a time. Each page should contain items that describe GUI widgets including items that allow users to switch to different pages without necessarily contacting a server program. XFDL allows the page switching items to be defined in the form so the form developer can add computations that control the flow of pages based on context.