Browse Source

Merging formbuilder changes.

pull/105/head
Nigel Banks 14 years ago
parent
commit
ac12e834c7
  1. 225
      ContentModel.inc
  2. 47
      api/fedora_utils.inc
  3. 544
      islandoracm.xsd

225
ContentModel.inc

@ -11,6 +11,7 @@ class ContentModel extends XMLDatastream {
private $mimes = NULL; private $mimes = NULL;
public $pid_namespace; public $pid_namespace;
public $name; public $name;
private $xpath;
/** /**
* Gets the default DSID to use for ContentModel datastreams. * Gets the default DSID to use for ContentModel datastreams.
@ -223,8 +224,9 @@ class ContentModel extends XMLDatastream {
public function __construct($xmlStr, $pid = NULL, $dsid = NULL, $pid_namespace = NULL, $name = NULL) { public function __construct($xmlStr, $pid = NULL, $dsid = NULL, $pid_namespace = NULL, $name = NULL) {
parent::__construct($xmlStr, $pid, $dsid); parent::__construct($xmlStr, $pid, $dsid);
$this->pid_namespace = $pid_namespace; $this->pid_namespace = $pid_namespace;
$this->name = ($name == NULL)?'Islandora Content Model':$name; $this->name = ($name == NULL)?'Islandora Content Model':$name;
$this->xpath = new DOMXPath($this->xml);
$this->xpath->registerNamespace('cm', 'http://www.islandora.ca');
} }
/** /**
@ -2013,4 +2015,225 @@ class ContentModel extends XMLDatastream {
} }
return $ret; return $ret;
} }
/**
* Find the form element with name $name.
*
* @param string $name
* The name of the form element to find.
* @return DOMElement
* The form element $name, if found FALSE otherwise.
*/
public function getForm($name) {
$result = $this->xpath->query("//cm:form[@name='$name']");
return $result->length == 1 ? $result->item(0) : FALSE;
}
/**
*
* @return array
* An array of form names that exist in this content model.
*/
public function getFormNames() {
if (!$this->validate()) {
return FALSE;
}
$names = FALSE;
$result = $this->xpath->query('//cm:forms/cm:form/@name'); // Select the name attribute of all forms.
for($i = 0; $i < $result->length; $i++) {
$attribute = $result->item($i);
$name = $attribute->value;
$names[$name] = $name;
}
return $names;
}
/**
*
* @return array
* An array of form names that exist in this content model.
*/
public function getIngestFormNames() {
if (!$this->validate()) {
return FALSE;
}
$result = $this->xpath->query('//cm:forms/cm:form[@ingest_class and @ingest_file and @ingest_module]/@name'); // Select the name attribute of all forms.
for($i = 0; $i < $result->length; $i++) {
$attribute = $result->item($i);
$name = $attribute->value;
$names[$name] = $name;
}
return $names;
}
/**
*
* @return array
* An array of form names that exist in this content model.
*/
public function getEditFormNames() {
if (!$this->validate()) {
return FALSE;
}
$result = $this->xpath->query('//cm:forms/cm:form[@edit_class and @edit_file and @edit_module]/@name'); // Select the name attribute of all forms.
for($i = 0; $i < $result->length; $i++) {
$attribute = $result->item($i);
$name = $attribute->value;
$names[$name] = $name;
}
return $names;
}
/**
* Removes the named form.
*
* @param string $name
* Name of the form to remove.
*
* @return boolean
* TRUE on success, FALSE otherwise.
*/
public function removeForm($name) {
$result = $this->xpath->query("//cm:form[@name='$name']");
if ($result->length == 1) {
$form = $result->item(0);
$form->parentNode->removeChild($form);
return TRUE;
}
return FALSE;
}
/**
* Adds the named form.
*
* @param string $element
* Name of the form to add.
*
* @return boolean
* TRUE on success, FALSE otherwise.
*/
public function addForm($element) {
$result = $this->xpath->query("//cm:forms");
if ($result->length == 0) { // Forms doesn't exist
$forms = $this->xml->createElement('forms');
$element = $this->xml->importNode($element);
$forms->appendChild($element);
$result = $this->xpath->query("//cm:content_model");
$result->item(0)->appendChild($forms);
return TRUE;
}
else if ($result->length == 1) {
$element = $this->xml->importNode($element);
$result->item(0)->appendChild($element);
return TRUE;
}
return FALSE;
}
/**
* Edits a form element with attribute name='$name' from the 'forms' element.
*
* @param String $name
*/
public function editForm($name, $element) {
if (!$this->validate()) {
return FALSE;
}
$result = $this->xpath->query("//cm:form[@name='$name']");
if($result->length == 1) {
$form = $result->item(0);
$result = $this->xpath->query("child::node()", $form);
$element = $this->xml->importNode($element);
for($i = 0; $i < $result->length; $i++) {
$child = $result->item($i);
$element->appendChild($child);
}
$form->parentNode->replaceChild($element, $form);
return TRUE;
}
return FALSE;
}
/**
*
* @param <type> $element_definition
* @param <type> $parent_element
* @return <type>
*/
public function addElementToForm($element, $parent_element) {
$element = $this->xml->importNode($element, TRUE);
$parent_element->appendChild($element);
return TRUE;
}
/**
*
* @param <type> $element_definition
* @param <type> $parent_element
*/
public function editFormElement($new_element, $edit_element) {
$new_element = $this->xml->importNode($new_element, TRUE);
$name = $new_element->tagName;
$result = $new_element->getElementsByTagName('content');
if($result->length == 1) {
$new_content = $result->item(0);
$result = $this->xpath->query("child::cm:content/child::node()", $edit_element);
for($i = 0; $i < $result->length; $i++) {
$child = $result->item($i);
$new_content->appendChild($child);
}
}
$edit_element->parentNode->replaceChild($new_element, $edit_element);
return TRUE;
}
/**
*
* @param <type> $new_element
* @param <type> $element
*/
private function insertElementInPlace($new_element, $element) {
$next = $element->nextSibling;
if ($next) {
$element->parentNode->insertBefore($new_element, $next);
}
else {
$element->parentNode->appendChild($new_element);
}
}
/**
*
* @param <type> $form_element
* @return <type>
*/
public function incFormElement($form_element) {
$prev = $form_element;
$name = $prev->getAttribute('name');
while ($prev = $prev->previousSibling) {
if (get_class($prev) == 'DOMElement') {
$form_element->parentNode->insertBefore($form_element, $prev);
break;
}
}
return TRUE;
}
/**
*
* @param <type> $form_element
* @return <type>
*/
public function decFormElement($form_element) {
$next = $form_element;
while ($next = $next->nextSibling) {
if (get_class($next) == 'DOMElement') {
$this->insertElementInPlace($form_element, $next);
break;
}
}
return TRUE;
}
} }

47
api/fedora_utils.inc

@ -88,20 +88,41 @@ function fix_encoding($in_str) {
} }
} }
function validPid($pid) { function validPid($pid) {
$valid = FALSE; $valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) { if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE; $valid = TRUE;
}
return $valid;
} }
function validDsid($dsid) { return $valid;
$valid = FALSE; }
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;
}
return $valid; function validDsid($dsid) {
$valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;
} }
return $valid;
}
function fixDsid($dsid) {
$new_dsid = trim($dsid);
$find = '/[^a-zA-Z0-9\.\_\-]/';
$replace = '';
$new_dsid = preg_replace($find, $replace, $new_dsid);
if( strlen($new_dsid) > 63 )
$new_dsid = substr($new_dsid, -63);
if( preg_match('/^[^a-zA-Z]/', $dsid ) )
$new_dsid = 'x' . $new_dsid;
if( strlen($new_dsid) == 0 )
$new_dsid = 'item' . rand(1, 100);
return $new_dsid;
}

544
islandoracm.xsd

@ -1,167 +1,385 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.islandora.ca" elementFormDefault="qualified" > <xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<xsd:annotation> targetNamespace="http://www.islandora.ca" elementFormDefault="qualified">
<xsd:documentation xml:lang="en"> <xsd:annotation>
<xsd:documentation xml:lang="en">
Islandora Content Model Schema Islandora Content Model Schema
Islandora, Robertson Library, University of Prince Edward Island, 550 University Ave., Charlottetown, Prince Edward Island Islandora, Robertson Library, University of Prince Edward Island, 550 University Ave., Charlottetown, Prince Edward Island
</xsd:documentation> </xsd:documentation>
</xsd:annotation> </xsd:annotation>
<xsd:element name="content_model" type="content_modelType"/> <xsd:element name="content_model" type="content_modelType"/>
<xsd:complexType name="content_modelType"> <xsd:complexType name="content_modelType">
<xsd:all> <xsd:all>
<xsd:element name="mimetypes" type="mimetypesType"/> <xsd:element name="mimetypes" type="mimetypesType"/>
<xsd:element name="ingest_form" type="ingest_formType"/> <xsd:element name="ingest_form" type="ingest_formType"/>
<xsd:element name="datastreams" type="datastreamsType" minOccurs="0"/> <xsd:element name="datastreams" type="datastreamsType" minOccurs="0"/>
<xsd:element name="ingest_rules" type="ingest_rulesType"/> <xsd:element name="ingest_rules" type="ingest_rulesType"/>
<xsd:element name="edit_metadata_method" type="edit_metadata_methodType" minOccurs="0"/> <xsd:element name="edit_metadata_method" type="edit_metadata_methodType" minOccurs="0"/>
</xsd:all> <xsd:element name="forms">
<xsd:attribute name="name" type="xsd:normalizedString" use="required"/> <xsd:complexType>
</xsd:complexType> <xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="form" type="formType"
<xsd:complexType name="mimetypesType"> />
<xsd:sequence> </xsd:sequence>
<xsd:element name="type" type="xsd:string" maxOccurs="unbounded"/> </xsd:complexType>
</xsd:sequence> </xsd:element>
</xsd:complexType> </xsd:all>
<xsd:attribute name="name" type="xsd:normalizedString" use="required"/>
<xsd:complexType name="ingest_formType"> </xsd:complexType>
<xsd:all>
<xsd:element name="form_builder_method" type="form_builder_methodType"/> <xsd:complexType name="mimetypesType">
<xsd:element name="form_elements" type="form_elementsType"/> <xsd:sequence>
</xsd:all> <xsd:element name="type" type="xsd:string" maxOccurs="unbounded"/>
<xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> </xsd:sequence>
<xsd:attribute name="page" type="xsd:positiveInteger" use="required"/> </xsd:complexType>
<xsd:attribute name="hide_file_chooser" type="xsd:boolean" default="false"/>
<xsd:attribute name="redirect" type="xsd:boolean" default="true"/> <xsd:complexType name="ingest_formType">
<xsd:all>
</xsd:complexType> <xsd:element name="form_builder_method" type="form_builder_methodType"/>
<xsd:complexType name="form_builder_methodType"> <xsd:element name="form_elements" type="form_elementsType"/>
<xsd:attribute name="file" type="xsd:normalizedString" use="required"/> </xsd:all>
<xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="page" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="hide_file_chooser" type="xsd:boolean" default="false"/>
<xsd:attribute name="handler" type="xsd:normalizedString" use="required"/> <xsd:attribute name="redirect" type="xsd:boolean" default="true"/>
</xsd:complexType>
<xsd:complexType name="edit_metadata_methodType"> </xsd:complexType>
<xsd:attribute name="file" type="xsd:normalizedString" use="required"/> <xsd:complexType name="form_builder_methodType">
<xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="class" type="xsd:normalizedString" use="required"/> <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="handler" type="xsd:normalizedString" use="required"/> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> <xsd:attribute name="handler" type="xsd:normalizedString" use="required"/>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="form_elementsType"> <xsd:complexType name="edit_metadata_methodType">
<xsd:sequence> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/>
<xsd:element name="element" type="elementType" minOccurs="0" maxOccurs="unbounded"/> <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/>
</xsd:sequence> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/>
</xsd:complexType> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="handler" type="xsd:normalizedString" use="required"/>
<xsd:complexType name="elementType"> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/>
<xsd:all> </xsd:complexType>
<xsd:element name="description" type="xsd:string" minOccurs="0"/> <xsd:complexType name="form_elementsType">
<xsd:element name="authoritative_list" type="authoritative_listType" minOccurs="0"/> <xsd:sequence>
<xsd:element name="parameters" type="parametersType" minOccurs="0"/> <xsd:element name="element" type="elementType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:all> </xsd:sequence>
<xsd:attribute name="label" type="xsd:normalizedString"/> </xsd:complexType>
<xsd:attribute name="name" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="type" type="xsd:normalizedString" use="required"/> <xsd:complexType name="elementType">
<xsd:attribute name="required" type="xsd:boolean" default="false"/> <xsd:all>
</xsd:complexType> <xsd:element name="description" type="xsd:string" minOccurs="0"/>
<xsd:element name="authoritative_list" type="authoritative_listType" minOccurs="0"/>
<xsd:complexType name="authoritative_listType"> <xsd:element name="parameters" type="parametersType" minOccurs="0"/>
<xsd:sequence> </xsd:all>
<xsd:element name="item" type="itemType" minOccurs="1" maxOccurs="unbounded"/> <xsd:attribute name="label" type="xsd:normalizedString"/>
</xsd:sequence> <xsd:attribute name="name" type="xsd:normalizedString" use="required"/>
</xsd:complexType> <xsd:attribute name="type" type="xsd:normalizedString" use="required"/>
<xsd:complexType name="itemType"> <xsd:attribute name="required" type="xsd:boolean" default="false"/>
<xsd:simpleContent> </xsd:complexType>
<xsd:extension base="xsd:string">
<xsd:attribute name="field" type="xsd:string" use="optional"/> <xsd:complexType name="authoritative_listType">
</xsd:extension> <xsd:sequence>
</xsd:simpleContent> <xsd:element name="item" type="itemType" minOccurs="1" maxOccurs="unbounded"/>
</xsd:complexType> </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ingest_rulesType"> <xsd:complexType name="itemType">
<xsd:sequence> <xsd:simpleContent>
<xsd:element name="rule" type="ruleType" minOccurs="0" maxOccurs="unbounded"/> <xsd:extension base="xsd:string">
</xsd:sequence> <xsd:attribute name="field" type="xsd:string" use="optional"/>
</xsd:complexType> </xsd:extension>
</xsd:simpleContent>
<xsd:complexType name="ruleType"> </xsd:complexType>
<xsd:sequence>
<xsd:element name="applies_to" type="xsd:normalizedString" minOccurs="1" maxOccurs="unbounded"/> <xsd:complexType name="ingest_rulesType">
<xsd:element name="ingest_methods" type="ingest_methodsType" minOccurs="0"/> <xsd:sequence>
</xsd:sequence> <xsd:element name="rule" type="ruleType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:complexType> </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ingest_methodsType">
<xsd:sequence> <xsd:complexType name="ruleType">
<xsd:element name="ingest_method" type="ingest_methodType" minOccurs="1" maxOccurs="unbounded"/> <xsd:sequence>
</xsd:sequence> <xsd:element name="applies_to" type="xsd:normalizedString" minOccurs="1"
</xsd:complexType> maxOccurs="unbounded"/>
<xsd:complexType name="ingest_methodType"> <xsd:element name="ingest_methods" type="ingest_methodsType" minOccurs="0"/>
<xsd:all> </xsd:sequence>
<xsd:element name="parameters" type="parametersType" minOccurs="0" /> </xsd:complexType>
</xsd:all>
<xsd:complexType name="ingest_methodsType">
<xsd:attribute name="file" type="xsd:normalizedString" use="required"/> <xsd:sequence>
<xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:element name="ingest_method" type="ingest_methodType" minOccurs="1"
<xsd:attribute name="class" type="xsd:normalizedString" use="required"/> maxOccurs="unbounded"/>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/> </xsd:sequence>
<xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> </xsd:complexType>
<xsd:attribute name="modified_files_ext" type="xsd:normalizedString" use="required"/> <xsd:complexType name="ingest_methodType">
</xsd:complexType> <xsd:all>
<xsd:element name="parameters" type="parametersType" minOccurs="0"/>
<xsd:complexType name="datastreamsType"> </xsd:all>
<xsd:sequence>
<xsd:element name="datastream" type="datastreamType" minOccurs="1" maxOccurs="unbounded"/> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/>
</xsd:sequence> <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/>
</xsd:complexType> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/>
<xsd:complexType name="datastreamType"> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/>
<xsd:sequence> <xsd:attribute name="modified_files_ext" type="xsd:normalizedString" use="required"/>
<xsd:element name="display_method" type="display_methodType" minOccurs="0" maxOccurs="unbounded"/> </xsd:complexType>
<xsd:element name="add_datastream_method" type="add_datastream_methodType" minOccurs="0" maxOccurs="1"/>
<xsd:complexType name="datastreamsType">
</xsd:sequence> <xsd:sequence>
<xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> <xsd:element name="datastream" type="datastreamType" minOccurs="1" maxOccurs="unbounded"
<xsd:attribute name="display_in_fieldset" type="xsd:boolean" default="true"/> />
</xsd:complexType> </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="add_datastream_methodType">
<xsd:all> <xsd:complexType name="datastreamType">
<xsd:element name="parameters" type="parametersType" minOccurs="0" /> <xsd:sequence>
</xsd:all> <xsd:element name="display_method" type="display_methodType" minOccurs="0"
<xsd:attribute name="file" type="xsd:normalizedString" use="required"/> maxOccurs="unbounded"/>
<xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> <xsd:element name="add_datastream_method" type="add_datastream_methodType" minOccurs="0"
<xsd:attribute name="class" type="xsd:normalizedString" use="required"/> maxOccurs="1"/>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/> </xsd:sequence>
<xsd:attribute name="modified_files_ext" type="xsd:normalizedString" use="required"/> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/>
</xsd:complexType> <xsd:attribute name="display_in_fieldset" type="xsd:boolean" default="true"/>
<xsd:complexType name="parametersType"> </xsd:complexType>
<xsd:sequence>
<xsd:element name="parameter" type="parameterType" minOccurs="1" maxOccurs="unbounded"/> <xsd:complexType name="add_datastream_methodType">
</xsd:sequence> <xsd:all>
</xsd:complexType> <xsd:element name="parameters" type="parametersType" minOccurs="0"/>
<xsd:complexType name="parameterType"> </xsd:all>
<xsd:simpleContent> <xsd:attribute name="file" type="xsd:normalizedString" use="required"/>
<xsd:extension base="xsd:string"> <xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/>
<xsd:attribute name="name" type="xsd:normalizedString" use="required"/> <xsd:attribute name="class" type="xsd:normalizedString" use="required"/>
</xsd:extension> <xsd:attribute name="method" type="xsd:normalizedString" use="required"/>
</xsd:simpleContent> <xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/>
</xsd:complexType> <xsd:attribute name="modified_files_ext" type="xsd:normalizedString" use="required"/>
<xsd:complexType name="display_methodType"> </xsd:complexType>
<xsd:complexContent> <xsd:complexType name="parametersType">
<xsd:restriction base="xsd:anyType"> <xsd:sequence>
<xsd:attribute name="file" type="xsd:normalizedString" use="required"/> <xsd:element name="parameter" type="parameterType" minOccurs="1" maxOccurs="unbounded"/>
<xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/> </xsd:sequence>
<xsd:attribute name="class" type="xsd:normalizedString" use="required"/> </xsd:complexType>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/> <xsd:complexType name="parameterType">
<xsd:attribute name="default" type="xsd:boolean" default="false"/> <xsd:simpleContent>
</xsd:restriction> <xsd:extension base="xsd:string">
</xsd:complexContent> <xsd:attribute name="name" type="xsd:normalizedString" use="required"/>
</xsd:complexType> </xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="display_methodType">
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:attribute name="file" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="module" type="xsd:normalizedString" default="fedora_repository"/>
<xsd:attribute name="class" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="method" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="default" type="xsd:boolean" default="false"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="formType">
<xsd:complexContent>
<xsd:extension base="formElementType">
<xsd:attribute name="name" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="dsid" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="ingest_module" type="xsd:normalizedString"/>
<xsd:attribute name="ingest_file" type="xsd:normalizedString"/>
<xsd:attribute name="ingest_class" type="xsd:normalizedString"/>
<xsd:attribute name="edit_module" type="xsd:normalizedString" use="optional"/>
<xsd:attribute name="edit_file" type="xsd:normalizedString" use="optional"/>
<xsd:attribute name="edit_class" type="xsd:normalizedString" use="optional"/>
<xsd:attribute name="document_module" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="document_file" type="xsd:normalizedString" use="required"/>
<xsd:attribute name="document_class" type="xsd:normalizedString" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="formElementType">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element maxOccurs="1" minOccurs="1" name="fieldset">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element default="true" minOccurs="0" name="collapsible"
type="xsd:boolean"/>
<xsd:element default="false" minOccurs="0" name="collapsed"
type="xsd:boolean"/>
<xsd:element name="content" type="formElementType"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="textfield">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="required" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="default_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="autocomplete_path"
type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="1" name="textarea">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="required" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="default_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="select">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element name="options" type="formControlOptionsType"/>
<xsd:element minOccurs="0" name="required" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="default_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="1" name="set">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="required" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="default_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="autocomplete_path"
type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="1" name="filechooser">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="required" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="default_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="1" name="datepicker">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="required" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="default_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="tabpanel">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element default="true" minOccurs="0" name="collapsible"
type="xsd:boolean"/>
<xsd:element default="false" minOccurs="0" name="collapsed"
type="xsd:boolean"/>
<xsd:element name="content" type="formElementType"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="checkbox">
<xsd:complexType>
<xsd:all maxOccurs="1" minOccurs="1">
<xsd:element name="title" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="description" type="xsd:normalizedString"/>
<xsd:element name="return_value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="1" name="hidden">
<xsd:complexType>
<xsd:all>
<xsd:element minOccurs="1" name="value" type="xsd:normalizedString"/>
<xsd:element minOccurs="0" name="form_builder" type="formBuilderControlType"/>
<xsd:element minOccurs="0" name="content" type="formElementType"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="formControlXPathType">
<xsd:simpleContent>
<xsd:extension base="xsd:normalizedString">
<xsd:attribute name="full_path" type="xsd:boolean"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="formControlElementValidateType">
<xsd:complexContent>
<xsd:extension base="array"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="array">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="item" type="xsd:normalizedString"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="formControlOptionsType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="option" type="xsd:normalizedString"/>
</xsd:sequence>
<xsd:attribute name="ignoreFirstOption" type="xsd:boolean" use="required"/>
</xsd:complexType>
<xsd:complexType name="formBuilderControlType">
<xsd:sequence>
<xsd:element name="xpath">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="path">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:normalizedString">
<xsd:attribute name="full" type="xsd:boolean" use="required"
/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="parent_path" minOccurs="0">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:normalizedString"> </xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:choice>
<xsd:element name="xml" type="xsd:normalizedString"/>
<xsd:element name="element" type="xsd:normalizedString"/>
<xsd:element name="attribute" type="xsd:normalizedString"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="require_value" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema> </xsd:schema>

Loading…
Cancel
Save