dwc to dc transform query

80 views
Skip to first unread message

Nick Bywell

unread,
Jan 31, 2012, 6:58:02 AM1/31/12
to islandora-dev
Hi,

I am in the process of creating a form that allows the entry of taxon
meta-data, and would be grateful for some feedback as to whether I am
generally on the right track, and also some guidance on a specific
query.

I have created a form named “Islandora TAXON DWC Form”. The form is
linked to the darwinCore schema http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd.
The form is affiliated to a new content model called “Islandora TAXON
DWC Form”. I have edited the islandora_content_model_forms row in the
drupal database so that the form links to a new transform as follows:

Id 5
content_model islandora:taxonCModel
form_name Islandora TAXON DWC Form
dsid DWC TAXON
title_field [‘scientificName’]
transform dwc_taxon_to_dc.xsl
template NULL

The new dwc_taxon_to_dc.xsl is in the /var/www/html/sites/all/modules/
islandora/xsl/ folder.
I believe the dwc_taxon_to_dc.xsl is needed in order to populate the
<dc:title> and <dc:identifier> elements in the DC datastream on
ingested objects.
Viewing the content of the DC datastream on objects created by
existing solution packs, I see the xml for the DC datastream takes the
form:

<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/" 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">
<dc:title>Example title</dc:title>
<dc:identifier>image:45</dc:identifier>
</oai_dc:dc>

However, if I run the existing /var/www/html/sites/all/modules/
islandora/xsl/mods_to_dc.xsl transform on an example mods record, the
output appears in the following form:

<?xml version="1.0" encoding="UTF-8"?>
<srw_dc:dcCollection xmlns:srw_dc="info:srw/schema/1/dc-schema"
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/" xsi:schemaLocation="info:srw/schema/1/dc-schema
http://www.loc.gov/standards/sru/dc-schema.xsd">
:67
<srw_dc:dc xsi:schemaLocation="info:srw/schema/1/dc-schema
http://www.loc.gov/standards/sru/dc-schema.xsd">
<dc:title>FranUlmer.com -- Home Page</dc:title>
<dc:title>Fran Ulmer, Democratic candidate for Governor, Alaska,
2002</dc:title>
<dc:contributor>Ulmer, Fran</dc:contributor>
<dc:type>Website</dc:type>
<dc:date>20020702 - 20021203</dc:date>
<dc:language>eng</dc:language>
<dc:format>text/html</dc:format>
<dc:description>Website promoting the candidacy of Fran Ulmer,
Democratic candidate for Governor, Alaska, 2002. Includes candidate
biography, issue position statements, campaign contact information,
privacy policy and campaign news press releases. Site features enable
visitors to sign up for campaign email list, volunteer, make campaign
contributions and follow links to other internet locations.</
dc:description>
<dc:subject>Elections</dc:subject>
<dc:coverage>Alaska</dc:coverage>
<dc:subject>Elections--Alaska</dc:subject>
<dc:subject>Governors--Election</dc:subject>
<dc:coverage>Alaska</dc:coverage>
<dc:subject>Governors--Alaska--Election</dc:subject>
<dc:subject>Democratic Party (AK)</dc:subject>
<dc:relation>Election 2002 Web Archive--http://www.loc.gov/minerva/
collect/elec2002/</dc:relation>
<dc:identifier>http://www.franulmer.com/</dc:identifier>
<dc:identifier>http://wayback-cgi1.alexa.com/e2002/*/http://
www.franulmer.com/</dc:identifier>
</srw_dc:dc>
</srw_dc:dcCollection>

So I am unsure what the exact xml output of my new dwc_taxon_to_dc.xsl
should be?

Thanks,

Nick Bywell

The Freshwater Biological Association

Serhiy Polyakov

unread,
Jan 31, 2012, 7:04:28 PM1/31/12
to island...@googlegroups.com
Nick,

I have two comments.

I think location should be:
sites/all/modules/islandora_content_model_forms/transforms/dwc_taxon_to_dc.xsl

Output to DC depends of content of dwc_taxon_to_dc.xsl and I am sure
it should be more than just two fields dc:title and dc:identifeir


Serhiy Polyakov

University of North Texas

Nick Bywell

unread,
Feb 2, 2012, 7:57:09 AM2/2/12
to islandora-dev
Thanks for your help Serhiy. As I understand it, only the
<dc:identifier> and <dc:title> elements would need to be set in the DC
datastream for a darwinCore object, because the rest of the darwinCore
data would be stored in its own datastream (in this case DWC TAXON).
Perhaps I have misunderstood something?

I have put the dwc_taxon_to_dc.xsl transform in the correct location
but am still having problems. If I create a dublinCore-based form and
set the “XSL Trasform:” field to “dc_no_transform.xsl” while
affiliating it to a content model, a new object is ingested fine.
However, when I affiliate a form that is based on darwinCore to the
same content model and link to “dwc_taxon_to_dc.xsl” and set the
“Title Field” to “[‘scientificName’]”, and then subsequently try to
add a record via this form, on clicking on the “Next” button, a blank
page with a message-box appears that says “The connection was reset.
The connection to the server was reset while the page was loading.”
and in the “/var/log/httpd/error_log” file, there is the message
“[notice] child pid 7751 exit signal Sementation fault (11)”. The
dwc_taxon_to_dc.xsl transform is as follows:

<xsl:stylesheet version="1.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:dwr="http://rs.tdwg.org/dwc/xsd/
simpledarwincore/" xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
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:namespace-alias result-prefix="#default" stylesheet-prefix="dwr" /
>
<xsl:namespace-alias result-prefix="#default" stylesheet-prefix="dwc" /
>
<xsl:namespace-alias result-prefix="#default" stylesheet-
prefix="srw_dc" />
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="dwr:SimpleDarwinRecordSet"/>
</xsl:template>
<xsl:template match="dwr:SimpleDarwinRecordSet">
<xsl:apply-templates select="dwr:SimpleDarwinRecord"/>
</xsl:template>
<xsl:template match="dwr:SimpleDarwinRecord">
<oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title><xsl:value-of select="dwc:scientificName"/></dc:title>
<dc:identifier><xsl:value-of select="dwc:taxonID"/></dc:identifier>
</oai_dc:dc>
</xsl:template>
</xsl:stylesheet>

and when it is run against the following test record, which has been
modified only to include the <dwc:taxonID> and <dwc:scientificName>
elements (and was taken from http://rs.tdwg.org/dwc/terms/guides/xml/index.htm):

<?xml version="1.0"?>
<dwr:SimpleDarwinRecordSet
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://rs.tdwg.org/dwc/xsd/simpledarwincore/
http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
xmlns:dwr="http://rs.tdwg.org/dwc/xsd/simpledarwincore/">
<dwr:SimpleDarwinRecord>
<dcterms:type>PhysicalObject</dcterms:type>
<dcterms:modified>2009-02-12T12:43:31</dcterms:modified>
<dcterms:rightsHolder>Museum of Vertebrate Zoology</
dcterms:rightsHolder>
<dcterms:rights>Creative Commons License</dcterms:rights>
<dwc:scientificName>testus testicata</dwc:scientificName>
<dwc:taxonID>test:test1</dwc:taxonID>
<dwc:institutionCode>MVZ</dwc:institutionCode>
<dwc:collectionCode>Mammals</dwc:collectionCode>
<dwc:occurrenceID>urn:catalog:MVZ:Mammals:14523</
dwc:occurrenceID>
<dwc:basisOfRecord>PreservedSpecimen</dwc:basisOfRecord>
<dwc:country>Argentina</dwc:country>
<dwc:countryCode>AR</dwc:countryCode>
<dwc:stateProvince>Neuquén</dwc:stateProvince>
<dwc:locality>25 km al NNE de Bariloche por Ruta 40 (=237)</
dwc:locality>
</dwr:SimpleDarwinRecord>
</dwr:SimpleDarwinRecordSet>

the following output is produced:

<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://
purl.org/dc/elements/1.1/" xsi:schemaLocation="http://
www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>testus testicata</dc:title>
<dc:identifier>test:test1</dc:identifier>
</oai_dc:dc>


The exported darwinCore form is indicated below:

<?xml version="1.0"?>
<definition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2">
<properties>
<root_name>dwr:SimpleDarwinRecordSet</root_name>
<schema_uri>http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd</
schema_uri>
<namespaces default="http://rs.tdwg.org/dwc/xsd/
simpledarwincore/">
<namespace prefix="dcterms">http://purl.org/dc/terms</namespace>
<namespace prefix="dwr">http://rs.tdwg.org/dwc/xsd/
simpledarwincore/</namespace>
<namespace prefix="dwc">http://rs.tdwg.org/dwc/terms/</
namespace>
<namespace prefix="xsi">http://www.w3.org/2001/XMLSchema-
instace</namespace>
</namespaces>
</properties>
<form>
<properties>
<type>form</type>
<access>TRUE</access>
<required>FALSE</required>
<tree>TRUE</tree>
</properties>
<children>
<element name="taxonID">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>LSID, GUID or even local ID.</description>
<required>TRUE</required>
<title>Taxon ID</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:taxonID</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRedord/
dwc:taxonID</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="parentNameUsageID">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>An identifier for the name usage (documented
meaning of the name according
to a source) of the direct, most proximate higher-rank
parent taxon (in a classification)
of the most specific element of the scientificName.</
description>
<required>TRUE</required>
<title>Parent Name Usage ID</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:partentNameUsageID</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc:parentNameUsageID</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="scientificName">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>The full scientific name, with authorship and
date information if known.
When forming part of an Identification, this should be the
name in lowest level taxonomic
rank that can be determined. This term should not contain
identification qualifications,
which should instead be supplied in the
IdentificationQualifier term. Currently
scientific name without author is provided.</description>
<required>TRUE</required>
<title>Scientific Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:scientificName</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc:scientificName</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="scientificNameAuthorship">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>The authorship information for the
scientificName formatted according to the
conventions of the applicable nomenclaturalCode.</
description>
<required>FALSE</required>
<title>Scientic Name Authorship</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:scientificNameAuthorship</value>
</create>
<read>
<path>
/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc:scientificNameAuthorship</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="taxonRank">
<properties>
<type>textfield</type>
<access>TRUE</access>
<description>The taxonomic rank of the most specific name in
the scientificName.
Recommended best practice is to use a controlled
vocabulary.</description>
<required>TRUE</required>
<title>Taxon Rank</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:taxonRank</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc: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="taxonomicStatus">
<properties>
<type>select</type>
<access>TRUE</access>
<description>The status of the use of the scientificName as
a label for a taxon. Requires
taxonomic opinion to define the scope of a taxon. Rules of
priority then are used to
define the taxonomic status of the nomenclature contained in
that scope, combined with
the experts opinion. It must be linked to a specific
taxonomic reference that defines the
concept. Recommended best practice is to use a controlled
vocabulary.</description>
<options>
<Accepted>Accepted</Accepted>
<index key="Heterotypic synonym">Heterotypic synonym</
index>
<index key="Homotypic synonym">Homotypic synonym</index>
<Invalid>Invalid</Invalid>
<index key="Misapplied name">Misapplied name</index>
<Synonym>Synonym</Synonym>
<Valid>Valid</Valid>
</options>
<required>FALSE</required>
<title>Taxonomic Status</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:taxonomicStatus</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc: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>
<description>The nomenclatural code (or codes in the case of
an ambiregnal name) under
which the scientificName is constructed. Recommended best
practice is to use a controlled
vocabulary.</description>
<options>
<BioCode>BioCode</BioCode>
<BC>Bacteriological Code</BC>
<ICBN>International Code of Biological Nomenclature</ICBN>
<ICNCP>International Code of Nomenclature of Cultivated
Plants</ICNCP>
<ICZN>International Code of Zoological Nomenclature</ICZN>
<PhyloCode>PhyloCode</PhyloCode>
</options>
<required>FALSE</required>
<title>Nomenclatural Code</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:nomenclaturalCode</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc: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>
<description>A reference for the publication in which the
scientificName was originally
established under the rules of the associated
nomenclaturalCode.</description>
<required>FALSE</required>
<title>Published In</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:namePublishedIn</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc: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="taxonRemarks">
<properties>
<type>text_textarea</type>
<access>TRUE</access>
<required>FALSE</required>
<title>Taxon Remarks</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:taxonRemarks</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc:taxonRemarks</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>
<description>A common or vernacular name.</description>
<required>FALSE</required>
<title>Vernacular Name</title>
<tree>TRUE</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</
path>
<context>document</context>
<schema />
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:vernacularName</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc: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="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>

I am also a bit confused with regard to what the content of the
<dc:identifier> element should be set to, because in the
mods_to_dc.xsl, it is set to whatever was the content of
<mods:identifier>, but when an object is successfully ingested via a
form based on dublinCore, the content of <dc:identifier> seems to be
irrelevant, as the PID is set according to whatever the “Collection
Namespace” was set to when the collection was created (plus the next
number in the running sequence), as one would expect.

Any help would be gratefully received.

Nick Bywell

The Freshwater Biological Association



On Feb 1, 12:04 am, Serhiy Polyakov <sp0...@gmail.com> wrote:
> Nick,
>
> I have two comments.
>
> I think location should be:
> sites/all/modules/islandora_content_model_forms/transforms/dwc_taxon_to_dc.xsl
>
> Output to DC depends of content of dwc_taxon_to_dc.xsl and I am sure
> it should be more than just two fields dc:title and dc:identifeir
>
> Serhiy Polyakov
>
> University of North Texas
>
>
>
>
>
>
>
> On Tue, Jan 31, 2012 at 5:58 AM, Nick Bywell <NByw...@fba.org.uk> wrote:
> > Hi,
>
> > I am in the process of creating a form that allows the entry of taxon
> > meta-data, and would be grateful for some feedback as to whether I am
> > generally on the right track, and also some guidance on a specific
> > query.
>
> > I have created a form named “Islandora TAXON DWC Form”. The form is
> > linked to the darwinCore schemahttp://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd.
> > The form is affiliated to a new content model called “Islandora TAXON
> > DWC Form”. I have edited the islandora_content_model_forms row in the
> > drupal database so that the form links to a new transform as follows:
>
> > Id                             5
> > content_model          islandora:taxonCModel
> > form_name               Islandora TAXON DWC Form
> > dsid                         DWC TAXON
> > title_field                  [‘scientificName’]
> > transform                 dwc_taxon_to_dc.xsl
> > template                  NULL
>
> > The new dwc_taxon_to_dc.xsl is in the /var/www/html/sites/all/modules/
> > islandora/xsl/ folder.
> > I believe the dwc_taxon_to_dc.xsl is needed in order to populate the
> > <dc:title> and <dc:identifier> elements in the DC datastream on
> > ingested objects.
> > Viewing the content of the DC datastream on objects created by
> > existing solution packs, I see the xml for the DC datastream takes the
> > form:
>
> > <oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
> > xmlns:dc="http://purl.org/dc/elements/1.1/" 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">

Serhiy Polyakov

unread,
Feb 2, 2012, 5:48:02 PM2/2/12
to island...@googlegroups.com
Nick,

Actually you are right, only two DC elements are required and it is
OK. It is good idea to have more elements cross-walked to DC, for
example, if you want to support better interoperability via DC.

Not sure about form error.

Serhiy Polyakov,
University of North Texas

Nick Bywell

unread,
Feb 15, 2012, 7:32:40 AM2/15/12
to islandora-dev
Thanks Serhiy. I would be very grateful if someone could set up a very
basic form (perhaps just one field) and transform that works for the
darwinCore sample record and schema indicated above. I have tried
setting the SimpleDarwinRecord element to various different types
(e.g. fieldset, fieldgroup_simple and fieldgroup_fieldset) and put all
the other fields (except the “Submit”) within this set/group, but with
no success.

I presume from the example given in the “how to Create a Custom Ingest
Form” documentation that the “Root Element Name:” in “Form Properties”
should be set to “dwr:simpleDarwinRecordSet”. However, in the HTML-
form-post for ‘id="fedora-repository-ingest-form"’, setting it to this
value results in ‘action="/fedora/repository/eachryso%3Atestcoll">’ on
the post, where as setting it to just “dwr” gives ‘action="/fedora/
repository/eachryso%3Atestcoll/-/collection">’. The latter seems to
equate to the value associated with successful ingestions using other
forms. However, even when the action has the correct value, the
segmentation error still occurs, and the following error appears in /
usr/local/fedora/server/logs/fedora.log:

ERROR 2012-02-15 11:56:05.102 [http-8080-4]
(FedoraAPIABindingSOAPHTTPImpl) Error getting datastream dissemination
org.fcrepo.server.errors.DatastreamNotFoundException: [DefaulAccess]
No datastream could be returned. Either there is no datastream for the
digital object "eachryso:testcoll" with datastream ID of "POLICY "
OR there are no datastreams that match the specified date/time value
of "null " .
at
org.fcrepo.server.access.DefaultAccess.getDatastreamDissemination(DefaultAccess.java:
1150) [fcrepo-server-3.4.2.jar:na]
at
org.fcrepo.server.access.FedoraAPIABindingSOAPHTTPImpl.getDatastreamDissemination(FedoraAPIABindingSOAPHTTPImpl.java:
156) [fcrepo-server-3.4.2.jar:na]
at
org.fcrepo.server.access.FedoraAPIABindingSOAPHTTPSkeleton.getDatastreamDissemination(FedoraAPIABindingSOAPHTTPSkeleton.java:
186) [fcrepo-common-3.4.2.jar:na]
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
[na:na]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25) [na:1.6.0_27]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_27]
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:
397) [axis-1.3-PATCHED.jar:na]
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:
186) [axis-1.3-PATCHED.jar:na]
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:
323) [axis-1.3-PATCHED.jar:na]
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
32) [axis-1.3-PATCHED.jar:na]
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
[axis-1.3-PATCHED.jar:na]
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) [axis-1.3-
PATCHED.jar:na]
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:
453) [axis-1.3-PATCHED.jar:na]
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
[axis-1.3-PATCHED.jar:na]
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:
699) [axis-1.3-PATCHED.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
[servlet-api.jar:na]
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
327) [axis-1.3-PATCHED.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[servlet-api.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290) [catalina.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206) [catalina.jar:na]
at
org.fcrepo.server.security.jaas.AuthFilterJAAS.doFilter(AuthFilterJAAS.java:
295) [fcrepo-security-jaas-3.4.2.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235) [catalina.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206) [catalina.jar:na]
at
org.fcrepo.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:
235) [fcrepo-server-3.4.2.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235) [catalina.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206) [catalina.jar:na]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233) [catalina.jar:na]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191) [catalina.jar:na]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:
525) [catalina.jar:na]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128) [catalina.jar:na]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102) [catalina.jar:na]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109) [catalina.jar:na]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
293) [catalina.jar:na]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
849) [tomcat-coyote.jar:na]
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583) [tomcat-
coyote.jar:na]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
454) [tomcat-coyote.jar:na]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_27]

Thanks,

Nick Bywell

The Freshwater Biological Association

On Feb 2, 10:48 pm, Serhiy Polyakov <sp0...@gmail.com> wrote:
> Nick,
>
> > oai_dc/http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
> >  <dc:title><xsl:value-of select="dwc:scientificName"/></dc:title>
> >  <dc:identifier><xsl:value-of select="dwc:taxonID"/></dc:identifier>
> > </oai_dc:dc>
> > </xsl:template>
> > </xsl:stylesheet>
>
> > and when it is run against the following test record, which has been
> > modified only to include the <dwc:taxonID> and <dwc:scientificName>
> > elements (and was taken fromhttp://rs.tdwg.org/dwc/terms/guides/xml/index.htm):
> >www.openarchives.org/OAI/2.0/oai_dc/http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
> ...
>
> read more »

Don

unread,
Feb 18, 2012, 6:40:53 PM2/18/12
to islandora-dev
Hi Nick:
I looks like we may be doing lots of similar things :) ... I've got a
Simple Darwin Core xml formbuilder form (there's some default values
so you'll want to update those) and an associated DwC to DC
transformation. Let me know if the copy/paste doesn't work and I can
email the form/xslt to you.

=======
DwC form
=======

<?xml version="1.0"?>
<definition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2">
<properties>
<root_name>SimpleDarwinRecordSet</root_name>
<schema_uri/>
<namespaces default="http://rs.tdwg.org/dwc/xsd/
simpledarwincore/">
<namespace prefix="dwr">http://rs.tdwg.org/dwc/xsd/
simpledarwincore/</namespace>
<namespace prefix="xsi">http://www.w3.org/2001/XMLSchema-
instance</namespace>
<namespace prefix="dwc">http://rs.tdwg.org/dwc/terms/</
namespace>
<namespace prefix="dc">http://purl.org/dc/terms/</
namespace>
</namespaces>
</properties>
<form>
<properties>
<type>form</type>
<access>true</access>
<required>false</required>
<tree>true</tree>
</properties>
<children>
<element name="SimpleDarwinRecord">
<properties>
<type>markup</type>
<access>true</access>
<required>false</required>
<tree>true</tree>
<actions>
<create>
<path>/dwr:SimpleDarwinRecordSet</path>
<context>document</context>
<schema/>
<type>element</type>
<prefix/>
<value>SimpleDarwinRecord</value>
</create>
<read>
<path>/dwr:SimpleDarwinRecordSet/
dwr:SimpleDarwinRecord</path>
<context>document</context>
</read>
<update/>
<delete/>
</actions>
</properties>
<children>
<element name="record_level_terms">
<properties>
<type>fieldset</type>
<access>true</access>
<required>false</required>
<title>Record-level terms</title>
<tree>true</tree>
</properties>
<children>
<element name="type">
<properties>
<type>select</type>
<access>true</access>
<default_value>Occurrence</
default_value>
<description>The Darwin Core Type
Vocabulary extends the DCMI
Type Vocabulary and provides a
list of approved values that
may be used for the
basisOfRecord term to identify the
specific type of a resource.
For term descriptions see:

http://rs.tdwg.org/dwc/terms/type-vocabulary/index.htm</description>
<options>
<option key="Taxon">Taxon</
option>
<option
key="PreservedSpecimen">PreservedSpecimen</option>
<option
key="Occurrence">Occurrence</option>
<option
key="NomenclaturalChecklist"
>NomenclaturalChecklist</
option>
<option
key="MachineObservation">MachineObservation</option>
<option
key="Location">Location</option>
<option
key="LivingSpecimen">LivingSpecimen</option>
<option
key="HumanObservation">HumanObservation</option>
<option
key="FossilSpecimen">FossilSpecimen</option>
<option key="Event">Event</
option>
</options>
<required>false</required>
<title>Type</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dc</prefix>
<value>dc:type</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dc:type</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="language">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>English</
default_value>
<required>false</required>
<title>Language</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dc</prefix>
<value>dc:language</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dc:language</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="rights">
<properties>
<type>textarea</type>
<access>true</access>
<default_value>This material is
provided for research,
education, and private use
only.</default_value>
<required>false</required>
<title>Rights</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dc</prefix>
<value>dc:rights</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dc:rights</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="rightsHolder">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>University of
Prince Edward
Island</default_value>
<required>false</required>
<title>Rights Holder</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dc</prefix>
<value>dc:rightsHolder</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dc:rightsHolder</
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="accessRights">
<properties>
<type>textarea</type>
<access>true</access>
<default_value>Creative Commons
Attribution-NonCommercial-
NoDerivs 2.5 Canada
License</default_value>
<required>false</required>
<title>Rights Holder</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dc</prefix>
<value>dc:accessRights</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dc:accessRights</
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="institutionCode">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>UPEI</
default_value>
<required>false</required>
<title>Institution Code</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>

<value>dwc:institutionCode</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:institutionCode</
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="collectionCode">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>herbarium</
default_value>
<required>false</required>
<title>collectionCode</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:collectionCode</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:collectionCode</
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="basisOfRecord">
<properties>
<type>select</type>
<access>true</access>
<default_value>PreservedSpecimen</
default_value>
<description>A descriptive term
indicating whether the record
represents an object or
observation. Term definitions are
available here:

http://wiki.tdwg.org/twiki/bin/view/DarwinCore/BasisOfRecord</description>
<options>
<option key="Still
Image">Still Image</option>
<option
key="SoundRecording">SoundRecording</option>
<option
key="PreservedSpecimen">PreservedSpecimen</option>
<option
key="OtherSpecimen">OtherSpecimen</option>
<option
key="MovingImage">MovingImage</option>
<option
key="MachineObservation">MachineObservation</option>
<option
key="LivingSpecimen">LivingSpecimen</option>
<option
key="HumanObservation">HumanObservation</option>
<option
key="FossilSpecimen">FossilSpecimen</option>
</options>
<required>false</required>
<title>Basis of Record</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:basisOfRecord</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:basisOfRecord</
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="dwc_fields_occurrence">
<properties>
<type>fieldset</type>
<access>true</access>
<required>false</required>
<title>Occurrence terms</title>
<tree>true</tree>
</properties>
<children>
<element name="occurrenceID">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Occurrence ID</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:occurrenceID</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:occurrenceID</
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="catalogNumber">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Catalogue Number</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:catalogNumber</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:catalogNumber</
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="occurrenceRemarks">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Occurrence Remarks</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>

<value>dwc:occurrenceRemarks</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/
dwc:occurrenceRemarks</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="recordedBy">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Recorded By</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:recordedBy</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:recordedBy</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="dwc_fields_event">
<properties>
<type>fieldset</type>
<access>true</access>
<required>false</required>
<title>Event terms</title>
<tree>true</tree>
</properties>
<children>
<element name="eventDate">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Event Date</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:eventDate</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:eventDate</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="year">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Year</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:year</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:year</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="month">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Month</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:month</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:month</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="day">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Day</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:day</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:day</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="habitat">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Habitat</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:habitat</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:habitat</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="fieldNumber">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Field Number</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:fieldNumber</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:fieldNumber</
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="fieldNotes">
<properties>
<type>textarea</type>
<access>true</access>
<required>false</required>
<title>Field Notes</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:fieldNotes</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:fieldNotes</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="eventRemarks">
<properties>
<type>textarea</type>
<access>true</access>
<required>false</required>
<title>Event Remarks</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:eventRemarks</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:eventRemarks</
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="dwc_fields_location">
<properties>
<type>fieldset</type>
<access>true</access>
<required>false</required>
<title>Location terms</title>
<tree>true</tree>
</properties>
<children>
<element name="continent">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>North America</
default_value>
<required>false</required>
<title>Continent</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:continent</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:continent</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="country">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>Canada</
default_value>
<required>false</required>
<title>Country</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:country</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:country</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="countryCode">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Country Code</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:countryCode</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:countryCode</
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="stateProvince">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>State / Province</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:stateProvince</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:stateProvince</
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="county">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>County</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:county</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:county</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="municipality">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Municipality</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:municipality</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:municipality</
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="locality">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Locality</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:locality</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:locality</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="verbatimLocality">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Verbatim Locality</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>

<value>dwc:verbatimLocality</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:verbatimLocality</
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="decimalLatitude">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Decimal Latitude</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>

<value>dwc:decimalLatitude</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:decimalLatitude</
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="decimalLongitude">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Decimal Longitude</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>

<value>dwc:decimalLongitude</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:decimalLongitude</
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="dwc_fields_taxon">
<properties>
<type>fieldset</type>
<access>true</access>
<required>false</required>
<title>Taxon terms</title>
<tree>true</tree>
</properties>
<children>
<element name="taxonID">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Taxon ID</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:taxonID</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:taxonID</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="scientificName">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Sceintific Name</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:scientificName</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:scientificName</
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="kingdom">
<properties>
<type>textfield</type>
<access>true</access>
<default_value>Plantae</
default_value>
<required>false</required>
<title>Kingdom</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:kingdom</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:kingdom</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="phylum">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Phylum</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:phylum</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:phylum</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="class">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Class</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:class</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:class</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="order">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Order</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:order</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:order</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="family">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Family</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:family</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc: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="genus">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>genus</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:genus</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:genus</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="subgenus">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Subgenus</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:subgenus</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:subgenus</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="specificEpithet">
<properties>
<type>textfield</type>
<access>true</access>
<required>false</required>
<title>Specific Epithet</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>

<value>dwc:specificEpithet</value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:specificEpithet</
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>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:vernacularName</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc: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="taxonRemarks">
<properties>
<type>textarea</type>
<access>true</access>
<required>false</required>
<title>Taxon Remarks</title>
<tree>true</tree>
<actions>
<create>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord</path>
<context>document</
context>
<schema/>
<type>element</type>
<prefix>dwc</prefix>
<value>dwc:taxonRemarks</
value>
</create>
<read>
<path>/
dwr:SimpleDarwinRecordSet/dwr:SimpleDarwinRecord/dwc:taxonRemarks</
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>
<title>Submit</title>
<tree>true</tree>
</properties>
<children/>
</element>
</children>
</element>
</children>
</form>
</definition>

======
DwC to DC transform
======

<?xml version="1.0" encoding="UTF-8"?>

<!--
Created by Paul R Butler
University of Illinois - Graduate School of Library and
Information Science
Final Project for LIS590DPL: Document Processing - Spring 2010
Last Updated: May 5, 2010

This XSLT transforms DarwinCore XML to Simple Dublin Core XML.

Edited by dm ... DwC to OAI_DC June 2010.
-->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc.xsd">

<xsl:output method="xml" indent="yes" />

<xsl:template match="/">

<xsl:text> <!-- Used for formatting output file. -->
</xsl:text>

<xsl:text> <!-- Used for formatting output file. -->
</xsl:text>

<oai_dc:dc xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xsi:noNamespaceSchemaLocation="http://www.openarchives.org/
OAI/2.0/oai_dc.xsd">

<xsl:apply-templates/>

</oai_dc:dc>

</xsl:template>

<!-- Source elemnts are Dublin Core. -->
<xsl:template match="dc:type">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<type xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></type> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dc:language">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<language xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></language> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>


<!-- Source elemnts are Darwin Core. -->
<xsl:template match="dwc:basisOfRecord">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<source xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></source> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:scientificName">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<title xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></title> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:specificEpithet">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<subject xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></subject> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:family">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<subject xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></subject> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:genus">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<subject xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></subject> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:vernacularName">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<title xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></title> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:continent">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:country">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:countryCode">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:stateProvince">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:county">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:locality">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:habitat">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<coverage xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></coverage> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:occurrenceRemarks">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<description xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></description> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:occurrenceID">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<identifier xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></identifier> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:institutionCode">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<publisher xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></publisher> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>

</xsl:template>

<xsl:template match="dwc:collectionCode">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<identifier xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></identifier> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:catalogNumber">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<identifier xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></identifier> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:recordedBy">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<creator xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></creator> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="dwc:eventDate">
<xsl:choose>
<xsl:when test="normalize-space(.)"> <!-- Tests to see if
normalized element is null. If it is, does not output element to
source file. -->
<date xmlns="http://purl.org/dc/elements/
1.1/"><xsl:apply-templates/></date> <xsl:text> </
xsl:text><xsl:comment> Source node is <xsl:value-of select="name()"/>
</xsl:comment>
</xsl:when>
<xsl:otherwise> <!-- This is for when the element is null.
-->
<xsl:comment> Node <xsl:value-of select="name()"/> had
no content.</xsl:comment>
</xsl:otherwise>
</xsl:choose>

</xsl:template>

<!-- Exception Handling - If an element was not matched above this
section should output a message and the element as a comment to the
ouptput file. -->
<!-- For Dublin Core elements. -->
<xsl:template match="dc:*">
<xsl:choose>
<xsl:when test="dc:type | dc:language">
</xsl:when>
<xsl:otherwise>
<xsl:comment> Node <xsl:value-of select="name()"/>
with content "<xsl:apply-templates/>" was not matched.</xsl:comment>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- For Darwin Core elements. -->
<xsl:template match="dwc:*">
<xsl:choose>
<xsl:when test="dwc:basisOfRecord | dwc:scientificName |
dwc:specificEpithet | dwc:family | dwc:genus | dwc:vernacularName |
dwc:continent | dwc:country | dwc:countryCode | dwc:stateProvince |
dwc:county | dwc:locality | dwc:habitat | dwc:occurrenceRemarks |
dwc:occurrenceID | dwc:institutionCode | dwc:collectionCode |
dwc:catalogNumber | dwc:recordedBy | dwc:eventDate">
</xsl:when>
<xsl:otherwise>
<xsl:comment> Node <xsl:value-of select="name()"/>
with content "<xsl:apply-templates/>" was not matched.</xsl:comment>
</xsl:otherwise>
</xsl:choose>

</xsl:template>
<!-- End of Exception Handling section. -->

</xsl:stylesheet>

Nick Bywell

unread,
Feb 21, 2012, 6:32:13 AM2/21/12
to islandora-dev
This has been a great help thanks Don. The reason for the segmentation
fault occurring on ingest when I used my version of the form was
because I had quoted the schema URL in the Schema->Name field in “Form
Properties”. I guess you hit the same problem and worked out that it
had to be omitted on a darwinCore form for some reason.

Other reasons why my form did not function correctly were that I did
not realise that the SimpleDarwinRecord element had to have the field
type “markup” and that the “fieldset” elements should have no xpath
info.

Thanks again,

Nick Bywell

The Freshwater Biological Association

> ...
>
> read more »

Reply all
Reply to author
Forward
0 new messages