XML Forms is collection of drupal modules that allow for the manipulation of XML documents though Drupal forms. The Islandora Form Builder (XML_Forms modules) makes it possible for users to create, copy, and edit ingest forms, and to affiliate them with Content Models in the repository.

Modules Overview

The following Modules are installed as part of the XML Forms package. See inline documentation for additional details.

Objective Forms

This module allows for the creation of Object Based Drupal Forms. It provides a number of functions and class for processing/populating forms.

Some important notes.

Islandora XML Form API

The core of the library this module provides functions for processing XML files through forms.

In essence this module models.

Islandora XML Schema API

This module provides functions for processing Schema files. Its used to determine where to insert XML Nodes, and how to validate them.

Islandora XML Form Elements

This module defines custom Drupal Form Elements along with AHAH callbacks.

Elements

tabs/tabpanels

These Form Elements are used to model XML Nodes that can repeat and contain other XML Nodes.

Example:

<cntaddr> <!-- tabpanel one -->

<addrtype>undefined</addrtype>

<city>undefined</city>

<!-- ... -->

</cntaddr>

<cntaddr> <!-- tabpanel two -->

<addrtype>one</addrtype>

<!-- ... -->

</cntaddr>

tags/tag

These Form Elements are used to model XML Nodes that can repeat and contain only character data.

Example:

<origin>test</origin> <!-- tag #1 -->

<origin>undefined</origin> <!-- tag #2 -->

<origin>testing</origin> <!-- tag #3 -->

Islandora XML Form Builder

This module allows for importing/exporting/creating/editing/deleting form definitions. The form definitions are defined in XML and stored in the Drupal Database.

The form builder can be reached by following the “XML Form Builder” link in the Admin Content Management section.

From the main interface, users can:

XML Form Edit GUI

This GUI models the XML Definition, allowing the user to add/remove/edit form elements, as well as change their order.

XML CRUD Actions are very important. They define how to create/read/update/delete XML nodes using the form elements value and properties.

All actions define the Path and Path Context properties. These define where approximately in the XML document will the action be performed.

Path is an XPath that defines where the action will take place.

Path Context defines what context the path can be executed in. It can be one of three values:

  1. Document - The XPath is executed at the root of the document.
  2. *Parent - The XPath is executed at its parents context. This is only valid if the form element is embedded in another form element like a tab panel or fieldset, and that tab panel or fieldsets Read action selected an XML node.*
  3. *Self - The XPath is executed in the context selected by the Read action. This can be a bit tricky to understand. Read is the first action performed on the form element before rendering the element. Its used to populate the form element with a value. The node in which it gets its value from is set to be the Self context.*

XML Node Actions

Create

Element

Read

Update

Delete

Islandora XML Forms

This module exists to set up the proper namespace and requirements for including all other modules.

Islandora Content Model Forms

Overview

Create associations between content models and forms. A content model can be associated with any number of forms, and meta-data data-streams.

When this form is submitted it modifies the existing meta-data data-stream adding/removing/modifying elements according to what has changed in the form.

Pre-installation software checklist

Ensure that Islandora is installed and working, and that you have downloaded and enabled the XML Forms modules from http://islandora.ca/downloads. There will be a number of dependencies listed in the XML Forms section of your Drupal modules page – these must be downloaded and enabled before XML Forms will work.

Installation Steps

1. Download XML_Forms from http://islandora.ca/downloads and unzip in your modules directory

2. Install all dependencies

3. Activate the modules

4. Set permissions associated with Form Builder

6. Navigate to Administer>Content management>XML Form Builder to access the Form Builder and Administer>Content management>Form Associations to administer Form associations.