Simple Form Display

This demo displays simple form fields for data entry.
The fm:set-out command takes the following syntax: -
<fm:set-out match=”XPathnamespace:mode=”XPath” [namespace:attribute=”attribute-value”, namespace2:attribute=”attribute-value”, ...] />
The match attribute tells FOX what elements to set out on the screen. The namespace:mode attribute tells FOX which of the elements within the scope of the XPath should be displayed and when.
The fm:set-out command traverses along the XML Schema according to the XPath that has been specified. It will then set out all the elements within the scope of the XPath with the corresponding mode namespace. As the set-out command traverses the schema, it generates fragments of XHTML, which are then displayed to the user.
There are several rules to be aware of when using set-out:

  1. fox:ro or namespace:ro can be used on simple types and collections
  2. fox:edit or namespace:edit can be used on simple types only
  3. Data elements must exist in the DOM; set-out does not create elements
  4. Use the match attribute to target what to display
  5. Use namespaces to specify what display mode is required

NB: set-out looks at the matched structure and decides whether to display and descend. In order for set-out to descend, namespace:ro needs to be used on complex elements.

Mandatory fields are defined using the attribute fox:mand=”.” on an element.