MADS Ingest Form Problem

32 views
Skip to first unread message

Nick Bywell

unread,
Feb 17, 2012, 9:39:36 AM2/17/12
to islandora-dev
Hi,

I have set up a very basic MADS form based on the test record at:

http://books.google.co.uk/books?id=HiJNbEy5f70C&pg=PA326&lpg=PA326&dq=example+mads+record&source=bl&ots=ysqG_PjvW7&sig=Z8Vx2y_jeZT0W6sBCrw-isiObzc&hl=en&sa=X&ei=_MA7T4KhAsak0QX3p4ht&ved=0CGcQ6AEwCA#v=onepage&q=example%20mads%20record&f=false

The form consists only of the /mads/authority/name/namePart element. I
specified this element as the “Title field” when affiliating the form
to the content model and also a mads_to_dc.xsl transform in the "XSL
Transform" field. When I add a record using this form, an object is
ingested, but the DC datastream contains no <dc:title> element, only
the <dc:identifier> element, which is created automatically. The MADS
datastream in the ingested object contains:

<mads xmlns="http://www.loc.gov/mads/" xmlns:mods="http://www.loc.gov/
mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"></mads>

i.e. again, no content from /mads/authority/name/namePart

The mads_to_dc.xsl is as follows:

<xsl:stylesheet version="1.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:oai_dc="http://
www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsl="http://www.w3.org/
1999/XSL/Transform">
<xsl:template match="/">
<oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:apply-templates select="mads"/>
</oai_dc:dc>
</xsl:template>
<xsl:template match="mads">
<xsl:apply-templates select="authority"/>
</xsl:template>
<xsl:template match="authority">
<xsl:apply-templates select="name"/>
</xsl:template>
<xsl:template match="name">
<dc:title><xsl:value-of select="namePart"/></dc:title>
</xsl:template>
</xsl:stylesheet>

which produces the following transform output:

<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://
purl.org/dc/elements/1.1/" xmlns:srw_dc="info:srw/schema/1/dc-schema"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/
http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Smith, John</dc:title>
</oai_dc:dc>

The form I created is as follows:

<?xml version="1.0"?>
<definition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2">
<properties>
<root_name>mads</root_name>
<schema_uri>http://www.loc.gov/mads/mads.xsd</schema_uri>
<namespaces default="http://www.loc.gov/mads/">
<namespace prefix="mods">http://www.loc.gov/mods/v3</namespace>
<namespace prefix="xlink">http://www.w3.org/1999/xlink</
namespace>
<namespace prefix="xsi">http://www.w3.org/2001/XMLSchema-
instance</namespace>
</namespaces>
</properties>
<form>
<properties>
<type>form</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
</properties>
<children>
<element name="authority">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<required>TRUE</required>
<title>Authority</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>NULL</prefix>
<value>authority</value>
</create>
<read>
<path>/mads/authority</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children>
<element name="name">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads/authority</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>NULL</prefix>
<value>name</value>
</create>
<read>
<path>/mads/authority/name</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children>
<element name="namePart">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Name Part</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads/authority/name</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>NULL</prefix>
<value>namePart</value>
</create>
<read>
<path>/mads/authority/name/namePart</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
</children>
</element>
</children>
</element>
<element name="submit">
<properties>
<type>submit</type>
<access>TRUE</access>
<default_value>Submit</default_value>
<required>FALSE</required>
<title>Submit</title>
<tree>TRUE</tree>
</properties>
<children />
</element>
</children>
</form>
</definition>

Any guidance as to where things are going wrong would be gratefully
received.

Nick Bywell

The Freshwater Biological Association

Serhiy Polyakov

unread,
Feb 17, 2012, 4:19:48 PM2/17/12
to island...@googlegroups.com
Nick,

Is it correct that you tried this debugging path:

1. crated an object with MADS datastream using your form
2. exported that MADS datastream from created object into a file
3. run xsl transformation, for example, from command line using your
mads_to_dc.xsl crosswalk file
4. got correct dc document with dc:title there

If not may be these steps will help to see where the problem is.

Serhiy

Don

unread,
Feb 18, 2012, 6:10:40 PM2/18/12
to islandora-dev
Hi Nick:
I've got a couple of MADS (version 2) based forms that we've created
for one of the projects we are working one and we've got a very
similar .xsl transform.
Looking at yours ... am wondering if you've got the correct xpath when
looking for the element ... eg. //namePart ... not sure. Here's our
xslt:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/terms/"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<oai_dc:dc xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
>
<xsl:apply-templates exclude-result-prefixes="#all"/>
<xsl:element name="dc:title"><xsl:value-of select="//
namePart[@type='given']"/></xsl:element>
</oai_dc:dc>
</xsl:template>
<!-- suppress all else:-->
<xsl:template match="*"/>
</xsl:stylesheet>

Don

On Feb 17, 5:19 pm, Serhiy Polyakov <sp0...@gmail.com> wrote:
> Nick,
>
> Is it correct that you tried this debugging path:
>
> 1. crated an object with MADS datastream using your form
> 2. exported that MADS datastream from created object into a file
> 3. run xsl transformation, for example, from command line using your
> mads_to_dc.xsl crosswalk file
> 4. got correct dc document with dc:title there
>
> If not may be these steps will help to see where the problem is.
>
> Serhiy
>
>
>
>
>
>
>
> On Fri, Feb 17, 2012 at 8:39 AM, Nick Bywell <NByw...@fba.org.uk> wrote:
> > Hi,
>
> > I have set up a very basic MADS form based on the test record at:
>
> >http://books.google.co.uk/books?id=HiJNbEy5f70C&pg=PA326&lpg=PA326&dq...
>
> > The form consists only of the /mads/authority/name/namePart element. I
> > specified this element as the “Title field” when affiliating the form
> > to the content model and also a mads_to_dc.xsl transform in the "XSL
> > Transform" field. When I add a record using this form, an object is
> > ingested, but the DC datastream contains no <dc:title> element, only
> > the <dc:identifier> element, which is created automatically. The MADS
> > datastream in the ingested object contains:
>
> > <mads xmlns="http://www.loc.gov/mads/" xmlns:mods="http://www.loc.gov/
> > mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://
> >www.w3.org/2001/XMLSchema-instance"></mads>
>
> > i.e.  again, no content from /mads/authority/name/namePart
>
> > The mads_to_dc.xsl is as follows:
>
> > <xsl:stylesheet version="1.0" xmlns:xsi="http://www.w3.org/2001/
> > XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/"
> > xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:oai_dc="http://
> >www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsl="http://www.w3.org/
> > 1999/XSL/Transform">
> > <xsl:template match="/">
> > <oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
> > oai_dc/http://www.openarchives.org/OAI/2.0/oai_dc.xsd">

Nick Bywell

unread,
Feb 21, 2012, 6:34:38 AM2/21/12
to islandora-dev
Thanks Serhiy/Don. The title field is now being set correctly in the
DC datastream, but I am still not getting the MADS data added to the
MADS datasream. This must be an issue with my form rather than the
transform. I tried applying the principles learned from the darwinCore
form that Don submitted in the other thread, but I must still be
missing something. I would be very grateful Don, if you could also
post a MADS form.

On Feb 18, 11:10 pm, Don <don.mo...@gmail.com> wrote:
> Hi Nick:
> I've got a couple of MADS (version 2) based forms that we've created
> for one of the projects we are working one and we've got a very
> similar .xsl transform.
> Looking at yours ... am wondering if you've got the correct xpath when
> looking for the element ... eg. //namePart ... not sure.  Here's our
> xslt:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="2.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:dc="http://purl.org/dc/terms/"
>     >
>         <xsl:output method="xml" indent="yes"/>
>         <xsl:template match="/">
>             <oai_dc:dc xmlns:xsi="http://www.w3.org/2001/XMLSchema-
> instance"
>             xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
> oai_dc/http://www.openarchives.org/OAI/2.0/oai_dc.xsd"
> ...
>
> read more »

Don

unread,
Feb 22, 2012, 10:49:09 AM2/22/12
to islandora-dev
Hi Nick:
here's an example of a MADS form that could be used to create a name
authority record. I'm pretty new to MADS and have only recently
started to explore the schema, so this form is mostly a proof of
concept. I still have trouble with my xpaths and the contexts of the
elements, so am still learning the form builder. If you develop
additional forms I'd be interested in learning more about them.
Hope this helps,
Don

===== MADS name authority form for Islandora ======

<?xml version="1.0"?>
<definition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2">
<properties>
<root_name>mads</root_name>
<schema_uri>http://www.loc.gov/standards/mads/mads.xsd</
schema_uri>
<namespaces default="http://www.loc.gov/mads/v2">
<namespace prefix="xlink">http://www.w3.org/1999/xlink</
namespace>
<namespace prefix="xsi">http://www.w3.org/2001/XMLSchema-
instance</namespace>
<namespace prefix="mads">http://www.loc.gov/mads/v2</
namespace>
</namespaces>
</properties>
<form>
<properties>
<type>form</type>
<access>TRUE</access>
<attributes>
<schemaLocation/>
<enctype>multipart/form-data</enctype>
</attributes>
<required>FALSE</required>
<tree>TRUE</tree>
</properties>
<children>
<element name="authority">
<properties>
<type>markup</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Authorized Form of Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>authority</value>
</create>
<read>
<path>/mads:mads/mads:authority</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children>
<element name="name">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:authority</
path>
<context>document</context>
<schema/>
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;name type="personal"&gt;
%value%&lt;/name&gt;</value>
</create>
<read>
<path>/mads:mads/mads:authority/
mads:name[@type='personal']</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children>
<element name="auth_terms_of_address">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>eg. Dr., Prof., etc.</
description>
<required>FALSE</required>
<title>Terms of Address</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:authority/mads:name</path>
<context>document</
context>
<schema/>
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;namePart

type='termsOfAddress'&gt;%value%&lt;/namePart&gt;</value>
</create>
<read>
<path>/mads:mads/
mads:authority/mads:name/mads:namePart[@type='termsOfAddress']</path>
<context>document</
context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children/>
</element>
<element name="auth_given">
<properties>
<type>textfield</type>
<access>TRUE</access>

<autocomplete_path>researcher_given_autocomplete</autocomplete_path>
<required>FALSE</required>
<title>Given Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:authority/mads:name</path>
<context>document</
context>
<schema/>
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;namePart
type='given'&gt;%value
%&lt;/namePart&gt;</value>
</create>
<read>
<path>/mads:mads/
mads:authority/mads:name/mads:namePart[@type='given']</path>
<context>document</
context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children/>
</element>
<element name="auth_family">
<properties>
<type>textfield</type>
<access>TRUE</access>

<autocomplete_path>researcher_family_autocomplete</autocomplete_path>
<required>FALSE</required>
<title>Family Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:authority/mads:name</path>
<context>document</
context>
<schema/>
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;namePart
type='family'&gt;%value
%&lt;/namePart&gt;</value>
</create>
<read>
<path>/mads:mads/
mads:authority/mads:name/mads:namePart[@type='family']</path>
<context>document</
context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children/>
</element>
<element name="auth_date">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>If known, list birth
and death dates in the format
YYYY-YYYY</description>
<required>FALSE</required>
<title>Date</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:authority/mads:name</path>
<context>document</
context>
<schema/>
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;namePart
type='date'&gt;%value
%&lt;/namePart&gt;</value>
</create>
<read>
<path>/mads:mads/
mads:authority/mads:name/mads:namePart[@type='date']</path>
<context>document</
context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children/>
</element>
</children>
</element>
</children>
</element>
<element name="variantPage">
<properties>
<type>tabs</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Alternate Name(s)</title>
<tree>TRUE</tree>
</properties>
<children>
<element name="0">
<properties>
<type>tabpanel</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
</properties>
<children>
<element name="variant">
<properties>
<type>markup</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Variant</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>variant</value>
</create>
<read>
<path>/mads:mads/
mads:variant</path>
<context>document</
context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children>
<element name="name_variant">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:variant</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>NULL</
prefix>
<value>name</value>
</create>
<read>
<path>/mads:mads/
mads:variant/mads:name</path>
<context>document</
context>
</read>
<update>
<path>self::node()</
path>
<context>self</
context>
</update>
<delete>
<path>self::node()</
path>
<context>self</
context>
</delete>
</actions>
</properties>
<children>
<element
name="variant_given">
<properties>
<type>textfield</
type>
<access>TRUE</
access>
<required>FALSE</
required>
<title>Given Name</
title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:variant/mads:name</path>
<context>document</
context>
<schema/>
<type>xml</type>
<prefix>NULL</
prefix>
<value>&lt;namePart
type='given'&gt;
%value%&lt;/namePart&gt;</value>
</create>
<read>
<path>/mads:mads/
mads:variant/mads:name/mads:namePart[@type='given']</path>
<context>document</
context>
</read>
<update>
<path>self::node()</
path>
<context>self</
context>
</update>
<delete>
<path>self::node()</
path>
<context>self</
context>
</delete>
</actions>
</properties>
<children/>
</element>
<element
name="variant_family">
<properties>
<type>textfield</
type>
<access>TRUE</
access>
<required>FALSE</
required>
<title>Family Name</
title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/
mads:variant/mads:name</path>
<context>document</
context>
<schema/>
<type>xml</type>
<prefix>NULL</
prefix>
<value>&lt;namePart
type='family'&gt;
%value%&lt;/namePart&gt;</value>
</create>
<read>
<path>/mads:mads/
mads:variant/mads:name/mads:namePart[@type='family']</path>
<context>document</
context>
</read>
<update>
<path>self::node()</
path>
<context>self</
context>
</update>
<delete>
<path>self::node()</
path>
<context>self</
context>
</delete>
</actions>
</properties>
<children/>
</element>
</children>
</element>
</children>
</element>
</children>
</element>
</children>
</element>
<element name="affiliation">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<collapsible>TRUE</collapsible>
<required>FALSE</required>
<title>Affiliation</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>affiliation</value>
</create>
<read>
<path>/mads:mads/mads:affiliation</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children>
<element name="organization">
<properties>
<type>textfield</type>
<access>TRUE</access>
<autocomplete_path>islandora_autocomplete/
rels.hasModel:departmentCModel/mads.namePart/</autocomplete_path>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Department</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:affiliation</
path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>organization</value>
</create>
<read>
<path>/mads:mads/mads:affiliation/
mads:organization</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
<element name="position">
<properties>
<type>textfield</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<description>The faculty member's role in
the institution (eg. Assistant
Professor)</description>
<required>FALSE</required>
<title>Position</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:affiliation</
path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>position</value>
</create>
<read>
<path>/mads:mads/mads:affiliation/
mads:position</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
<element name="email">
<properties>
<type>textfield</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Email</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:affiliation</
path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>email</value>
</create>
<read>
<path>/mads:mads/mads:affiliation/
mads:email</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
<element name="phone">
<properties>
<type>textfield</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Phone</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:affiliation</
path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>phone</value>
</create>
<read>
<path>/mads:mads/mads:affiliation/
mads:phone</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children/>
</element>
<element name="dateValid">
<properties>
<type>textfield</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Date Valid</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:affiliation</
path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>dateValid</value>
</create>
<read>
<path>/mads:mads/mads:affiliation/
mads:dateValid</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
</children>
</element>
<element name="fieldOfActivity_tags">
<properties>
<type>tags</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Research Interests</title>
<tree>TRUE</tree>
</properties>
<children>
<element name="fieldOfActivity">
<properties>
<type>tag</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Research Interests</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>fieldOfActivity</value>
</create>
<read>
<path>/mads:mads/
mads:fieldOfActivity</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
</children>
</element>
<element name="note">
<properties>
<type>textarea</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<required>FALSE</required>
<title>Note</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>note</value>
</create>
<read>
<path>/mads:mads/mads:note</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
<element name="url">
<properties>
<type>textfield</type>
<access>TRUE</access>
<collapsible>FALSE</collapsible>
<description>Link to personal or institutional
page.</description>
<required>FALSE</required>
<title>URL</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema/>
<type>element</type>
<prefix>NULL</prefix>
<value>url</value>
</create>
<read>
<path>/mads:mads/mads:url</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children/>
</element>
<element name="submit">
<properties>
<type>submit</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
<value>Submit</value>
</properties>
<children/>
</element>
</children>
</form>
</definition>

Nick Bywell

unread,
Mar 9, 2012, 9:26:57 AM3/9/12
to islandora-dev
Thanks again Don. The form below is one possible approach we might
take in order to deal with some legacy chrysophyte data. We are
exploring the possibility of using MADS rather than darwinCore.

Nick Bywell

The Freshwater Biological Association

<?xml version="1.0"?>
<definition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2">
<properties>
<root_name>mads</root_name>
<schema_uri>http://www.loc.gov/standards/mads/mads.xsd</
schema_uri>
<namespaces default="http://www.loc.gov/mads/v2">
<namespace prefix="xlink">http://www.w3.org/1999/xlink</
namespace>
<namespace prefix="xsi">http://www.w3.org/2001/XMLSchmea-
instance</namespace>
<namespace prefix="mads">http://www.loc.gov/mads/v2</namespace>
</namespaces>
</properties>
<form>
<properties>
<type>form</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
</properties>
<children>
<element name="authority">
<properties>
<type>markup</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Authorized Form of Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;authority&gt;%value%&lt;/authority&gt;</
value>
</create>
<read>
<path>/mads:mads/mads:authority</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children>
<element name="name">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:authority</path>
<context>document</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;name&gt;%value%&lt;/name&gt;</value>
</create>
<read>
<path>/mads:mads/mads:authority/mads:name</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children>
<element name="namePart">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>TRUE</required>
<title>Scientific Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:authority/mads:name</path>
<context>document</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;namePart&gt;%value%&lt;/namePart&gt;</
value>
</create>
<read>
<path>/mads:mads/mads:authority/mads:name/
mads:namePart</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
</children>
</element>
</children>
</element>
<element name="extension">
<properties>
<type>fieldset</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads</path>
<context>document</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;extension&gt;%value%&lt;/extension&gt;</
value>
</create>
<read>
<path>/mads:mads/mads:extension</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children>
<element name="taxonRank">
<properties>
<type>textfield</type>
<access>TRUE</access>
<default_value>species</default_value>
<required>TRUE</required>
<title>Taxon Rank</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:taxonRank</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:taxonRank</
path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="whittonCode">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Whitton Code</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:whittonCode</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:whittonCode</
path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="vernacularName">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Vernacular Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>NULL</prefix>
<value>vernacularName</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:vernacularName</
path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="scientificAuthorship">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Scientific Authorship</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:scientificAuthorship</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:scientificAuthorship</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="taxonomicStatus">
<properties>
<type>select</type>
<access>TRUE</access>
<default_value>Accepted</default_value>
<options>
<accepted>Accepted</accepted>
<index key="heterotypic synonym">Heterotypic synonym</
index>
<index key="homotypic synonym">Homotypic synonym</
index>
<invalid>Invalid</invalid>
<misapplied>Misapplied</misapplied>
<synonym>Synonym</synonym>
<valid>Valid</valid>
</options>
<required>FALSE</required>
<title>Taxonomic Status</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:taxonomicStatus</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:taxonomicStatus</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="nomenclaturalCode">
<properties>
<type>select</type>
<access>TRUE</access>
<default_value>ICZN</default_value>
<options>
<PhyloCode>PhyloCode</PhyloCode>
<ICZN>ICZN</ICZN>
<ICNCP>ICNCP</ICNCP>
<ICBN>ICBN</ICBN>
<BioCode>BioCode</BioCode>
<BC>BC</BC>
</options>
<required>FALSE</required>
<title>Nomenclatural Code</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:nomenclaturalCode</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:nomenclaturalCode</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="namePublishedIn">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Published In</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:namePublishedIn</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:namePublishedIn</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="measurement">
<properties>
<type>tabs</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Measurement</title>
<tree>TRUE</tree>
</properties>
<children>
<element name="0">
<properties>
<type>tabpanel</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:measurement</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:measurement</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children>
<element name="measurementOf">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Measurement Of</title>
<tree>TRUE</tree>
<actions>
<create>
<path>self::node()</path>
<context>parent</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;measurementOf&gt;%value%&lt;/
measurementOf&gt;</value>
</create>
<read>
<path>mads:measurementOf</path>
<context>parent</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="unit">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Unit</title>
<tree>TRUE</tree>
<actions>
<create>
<path>self::node()</path>
<context>parent</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;unit&gt;%value%&lt;/unit&gt;</
value>
</create>
<read>
<path>mads:unit</path>
<context>parent</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children />
</element>
<element name="minimum">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Minimum</title>
<tree>TRUE</tree>
<actions>
<create>
<path>self::node()</path>
<context>parent</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;minimum&gt;%value%&lt;/
minimum&gt;</value>
</create>
<read>
<path>mads:minimum</path>
<context>parent</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children />
</element>
<element name="maximum">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Maximum</title>
<tree>TRUE</tree>
<actions>
<create>
<path>self::node()</path>
<context>parent</context>
<schema />
<type>xml</type>
<prefix>NULL</prefix>
<value>&lt;maximum&gt;%value%&lt;/
maximum&gt;</value>
</create>
<read>
<path>mads:maximum</path>
<context>parent</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>NULL</delete>
</actions>
</properties>
<children />
</element>
</children>
</element>
</children>
</element>
<element name="shape">
<properties>
<type>textarea</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Shape</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:shape</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:shape</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="taxonDistinguishingFeature">
<properties>
<type>textarea</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Taxon Distinguishing Feature</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:taxonDistinguishingFeature</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:taxonDistinguishingFeature</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="notToBeConfusedWithTaxa">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Not To Be Confused With Taxa</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:notToBeConfusedWithTaxa</value>
</create>
<read>
<path>/mads:mads/mads:extension/
mads:notToBeConfusedWithTaxa</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="ecology">
<properties>
<type>textarea</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Ecology</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:ecology</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:ecology</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="lifeForms">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Life Forms</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:lifeForms</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:lifeForms</
path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="lifeFormNotes">
<properties>
<type>textarea</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Life Form Notes</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:lifeFormNotes</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:lifeFormNotes</
path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="distribution">
<properties>
<type>textfield</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Distribution</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:distribution</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:distribution</
path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
<element name="notes">
<properties>
<type>textarea</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Notes</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/mads:mads/mads:extension</path>
<context>document</context>
<schema />
<type>element</type>
<prefix>mads</prefix>
<value>mads:notes</value>
</create>
<read>
<path>/mads:mads/mads:extension/mads:notes</path>
<context>document</context>
</read>
<update>
<path>self::node()</path>
<context>self</context>
</update>
<delete>
<path>self::node()</path>
<context>self</context>
</delete>
</actions>
</properties>
<children />
</element>
</children>
</element>
<element name="submit">
<properties>
<type>submit</type>
<access>TRUE</access>
<default_value>Submit</default_value>
<required>FALSE</required>
<tree>TRUE</tree>
</properties>
<children />
</element>
</children>
</form>
</definition>

mads_to_dc.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:dc="http://www.purl.org/dc/terms/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<oai_dc:dc xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/
oai_dc/">
<xsl:apply-templates exclude-result-prefixes="#all"/>
<xsl:element name="dc:title"><xsl:value-of select="//
namePart"/></xsl:element>
</oai_dc:dc>
</xsl:template>
<!-- suppress all else:-->
<xsl:template match="*"/>
</xsl:stylesheet>

> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages