XML Form Builder

Post on 10-Feb-2017

233 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

Transcript

XML Form BuilderThe Metadata Editor’s Editor

What’s Metadata?

Metadata is the data about other data.

● No specific format (Binary, JSON, XML)● Contextualizes data● It’s kinda of a big deal

Types of MetadataType of Metadata Function Supported Schema Examples

Descriptive Resource Discovery; Selection; Access DC: creator, title, subjectMODS: namePart, title, topicDarwinCore: scientificName

Preservation Resource Management FITS/FOXML: mimetypeExiftool: scannerModelName, ApertureValueFITS/FOXML: checksumsPREMIS: contentLocationType

Provenance Lifecycle management; Authentication FOXML: audit:responsibilityDC: sourceMODS: note type="ownership"

Contextual Awareness; Comprehension; Interpretation

DC: date, relationMODS: dateIssued, dateCaptured, relatedItem

Technical Use; Access; Resource Management Jhove: imageWidthJhove: size

Rights Management Access; Reproduction; Use/Re-use DC: rightsMODS: accessionConditionMETSRights

Why use a metadata standard ?

● Decisions made for you● Support from a wider community● Interoperability between your data and

others● Leverage existing tools

○ data dictionaries■ Digital Library Federation/Aquifer Implementation Guidelines for

Shareable MODS Records○ data extraction and transformation tools

■ http://www.loc.gov/standards/mods/mods-conversions.html

10/1/1991 ca. June 10, 1901

ca. 1920. (ca). June 19, 1901)

(ca). 1920) Scanned and Processed: 1998-06 01

2001.06.08 by CAD [between 1904 and 1908]

Unknown [ca. 1967]

1853 1918?

c1875 191-?

c1908 November 19 1870 December, c1871

[2001 or 2002] 1920, 1921, 1922, 1923, 1924,1925, 1926, 1927, 1928, 1929

[1919?] 20th century

Halloween 1975 IIIrd century A.D. (not before 237 A.D.)

PEI’s centennial January-February, 200 A.D.

1926 Web site: 7/25/02 Series 1871 ca. 1871

What is the XML Form Builder?

● A tool for creating/storing HTML forms that can create/manipulate XML Documents.

● A low level API for processing Form Definitions.

● A GUI build with Ext-JS that aids in creating Form Definitions.

XML Form Builder Features

● Works with most standards, wanna share?● Will work with custom standards.● Highly configurable● Forms are portable● Safe● Built upon the existing Drupal Form API

MODS PBCore FGDC MADS LIDO

Darwin Core Dublin Core EAC-CPF Yours! etc.

What the XML Form Builder is not

● Particularly user friendly● Simple● Intuitive

How to use the Form Builder

CRUD Rules

Create / Read / Update / Delete

The form treats each field in the form as a potential action.

XPaths describe where the action will take place in the XML Document.

CRUD (Read)

Populates the form with data from an XML document.

● Performed before displaying the form● Remembers what was read for later:

○ Updating or Deletion (self::)

CRUD (Update)If Read was successful.andIf the element/attribute exists.

After the form is submitted: We use the value in the form field to updated the element/attribute selected.

CRUD (Delete)If Read was successful.andIf the form field was removed from the form.

After the form is submitted: We Delete the element/attribute selected.

If Read was failed.andIf the parent XML element exists.

After the form is submitted: We create the new element/attribute and append it to the parent XML element.

CRUD (Create)

CRUD (Create) Options● Attribute

○ eg. <name type="personal">Joe</name>● Element

○ eg. <genre>book</genre>● XML: Snippets and the use of %value%

○ eg. <typeOfResource collecton=”yes”>%value%</typeOfResource>

CRUD (Create, Read, Update, Delete)

Create a DC Collection FormLets create a DC form for the Collection

Content Model

You can also download the formhttp://bit.ly/IfDcXM

Guidance Documents

A well formed DC collection type object. http://www.loc.gov/standards/mods/dcsimple-mods.html

Dublin Core Metadata Element Set, Version 1.1http://dublincore.org/documents/dces/

Add Form Properties

Form Properties

root element = oai_dc:dcnamespace uri = http://www.openarchives.org/OAI/2.0/oai_dc/

namespacesoai_dc | http://www.openarchives.org/OAI/2.0/oai_dc/xsi | http://www.w3.org/2001/XMLSchema-instancedc | http://purl.org/dc/elements/1.1/

Root element …

Add dc:title element …

Add dc:title element …

That’s the pattern we’ll follow...

1. copy the title element we just created2. Select the Root element3. Select Paste and then update the

element information.

Save & Preview

Enter test data.

Now add a dc:type element. It is a controlled vocabulary so we’ll add that as a Select form element. Get the terms from http://dublincore.org/usage/terms/dcmitype/#H7 .

DC Types● Collection● Dataset● Event● Image● InteractiveResource● MovingImage● PhysicalObject● Service● Software● Sound● StillImage● Text

Select Add, then create the Value and Label for each type. Select Update after adding each type. If you start with the last term first it saves on having to sort the terms.

Your record can have multiple types … you can use tab panels.

Tabs ● Read

Tab Panels ● Create● Read● Delete

Text Field● Read● Update

Associate the form

Go edit a Collection Object

Using Markup with Forms

Renders this

Form building Best Practices!

● Prefer Parent context for both Create and Read.

● Prefer Self context for Update and Delete.

● Have the hierarchy of form fields match the XML document it creates.

Debugging Errors

Watchdog log● http://192.168.56.195

/#overlay=admin/reports/dblog

Your apache log● /var/log/apache2/error.log

Questions?

top related