Top Banner
XML Form Builder The Metadata Editor’s Editor
45

XML Form Builder

Feb 10, 2017

Download

Documents

nguyenliem
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: XML Form Builder

XML Form BuilderThe Metadata Editor’s Editor

Page 2: XML Form Builder

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

Page 3: XML Form Builder

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

Page 5: XML Form Builder

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

Page 6: XML Form Builder

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

Page 7: XML Form Builder

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.

Page 8: XML Form Builder

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.

Page 9: XML Form Builder

What the XML Form Builder is not

● Particularly user friendly● Simple● Intuitive

Page 10: XML Form Builder

How to use the Form Builder

Page 12: XML Form Builder
Page 13: XML 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.

Page 14: XML Form Builder

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::)

Page 15: XML Form Builder

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.

Page 16: XML Form Builder

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.

Page 17: XML Form Builder

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)

Page 18: XML Form Builder

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>

Page 19: XML Form Builder
Page 20: XML Form Builder

CRUD (Create, Read, Update, Delete)

Page 21: XML Form Builder

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

Content Model

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

Page 22: XML Form Builder

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/

Page 23: XML Form Builder

Add Form Properties

Page 24: XML Form Builder

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/

Page 25: XML Form Builder

Root element …

Page 26: XML Form Builder

Add dc:title element …

Page 27: XML Form Builder

Add dc:title element …

Page 28: XML Form Builder

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.

Page 29: XML Form Builder

Save & Preview

Page 30: XML Form Builder

Enter test data.

Page 31: XML Form Builder

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 .

Page 32: XML Form Builder
Page 33: XML Form Builder
Page 34: XML Form Builder

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.

Page 35: XML Form Builder

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

Tabs ● Read

Page 36: XML Form Builder

Tab Panels ● Create● Read● Delete

Page 37: XML Form Builder

Text Field● Read● Update

Page 38: XML Form Builder

Associate the form

Page 39: XML Form Builder

Go edit a Collection Object

Page 40: XML Form Builder

Using Markup with Forms

Page 41: XML Form Builder

Renders this

Page 42: XML Form Builder

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.

Page 43: XML Form Builder

Debugging Errors

Watchdog log● http://192.168.56.195

/#overlay=admin/reports/dblog

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

Page 45: XML Form Builder

Questions?