Skip to content

Commit

Permalink
Merge pull request #52 from SAA-SDT/develop
Browse files Browse the repository at this point in the history
Merge updates on develop into master
  • Loading branch information
tcatapano authored Aug 1, 2016
2 parents 5b7bfa6 + ced5fc1 commit f3546db
Show file tree
Hide file tree
Showing 16 changed files with 19,220 additions and 2,768 deletions.
42 changes: 34 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
EAD2002toEAD3
=============

XSLT 2.0 Transformation to convert EAD2002 instances to EAD3
XSLT 2.0 Transformations to convert EAD2002 instances to EAD3

## Selecting a Transformation

There are four versions of the EAD 2002 to EAD3 migration style sheets: EAD2002ToEAD3schema.xsl, EAD2002ToEAD3schema_undeprecated.xsl, EAD2002ToEAD3dtd.xsl, and EAD2002ToEAD3dtd_undeprecated.xsl

All versions will accept DTD, RNG, and XSD-valid instances of EAD 2002.

To transform your EAD 2002 instances to schema-valid EAD3 (either RNG or XSD schemas), use EAD2002ToEAD3schema.xsl.

To transform your EAD 2002 instances to schema-valid undprecated EAD3 (either RNG or XSD schemas), use EAD2002ToEAD3schema_undeprecated.xsl.

To transform your EAD 2002 instances to DTD-valid EAD3, use EAD2002ToEAD3dtd.xsl.

To transform your EAD 2002 instances to DTD-valid undeprecated EAD3, use EAD2002ToEAD3dtd_undeprecated.xsl.

## Requirements

ead2002toEAD3.xsl is an XSLT 2.0 transformation and therefore requires an XSLT 2.0 capable processor. Any 9.x version of Saxon should work. The latest stable free of charge and open source and release of Saxon, Saxon-HE 9.6.0.8 (for Java), is available for download at: http://sourceforge.net/projects/saxon/files/Saxon-HE/9.6/SaxonHE9-6-0-8J.zip/download.
EAD2002ToEAD3schema.xsl, EAD2002ToEAD3schema_undeprecated.xsl, EAD2002ToEAD3dtd.xsl, and EAD2002ToEAD3dtd_undeprecated.xsl are XSLT 2.0 transformations and therefore requires an XSLT 2.0 capable processor. Any 9.x version of Saxon should work. The latest stable free of charge and open source and release of Saxon, Saxon-HE 9.6.0.8 (for Java), is available for download at: http://sourceforge.net/projects/saxon/files/Saxon-HE/9.6/SaxonHE9-6-0-8J.zip/download.

Saxon requires JDK 1.5 (Java 2 Platform, Standard Edition 5.0) or later

Full documentation for Saxon may be found at: http://www.saxonica.com/html/documentation9.6/about/

## To Run

From the commandline, assuming java is in the current user's PATH
From the commandline, assuming java is in the current user's PATH, and with the filename of the preferred style sheet

**Windows**:

`$ java -jar \PATH\TO/saxon9he.jar -o:[OUTPUT FILENAME] -xsl:[\PATH\TO\ead2002toEAD3.xsl] -s:[\PATH\TO\source EAD2002 file]`
`$ java -jar \PATH\TO/saxon9he.jar -o:[OUTPUT FILENAME] -xsl:[\PATH\TO\ead2002toEAD3schema.xsl] -s:[\PATH\TO\source EAD2002 file]`

**Mac OS X and Linux**:

`$ java -jar /PATH/TO/saxon9he.jar -o:[OUTPUT FILENAME] -xsl:[/PATH/TO/ead2002toEAD3.xsl] -s:[/PATH/TO/source EAD2002 file]`
`$ java -jar /PATH/TO/saxon9he.jar -o:[OUTPUT FILENAME] -xsl:[/PATH/TO/ead2002toEAD3schema.xsl] -s:[/PATH/TO/source EAD2002 file]`

(see also http://www.saxonica.com/documentation/#!using-xsl/commandline)

Expand All @@ -32,17 +46,29 @@ Note that the oXygen XML Editor (http://www.oxygenxml.com/) comes bundled with S

A number of parameters may be set by the user. The default value should be suitable for most. To set a parameter using saxon on the command line, append param="value" to the commands described above. For example:

`$ java -jar \PATH\TO/saxon9he.jar -o:[OUTPUT FILENAME] -xsl:[\PATH\TO\ead2002toEAD3.xsl] -s:[\PATH\TO\source EAD2002 file] addMigrationMessages=false()`
`$ java -jar \PATH\TO/saxon9he.jar -o:[OUTPUT FILENAME] -xsl:[\PATH\TO\ead2002toEAD3schema.xsl] -s:[\PATH\TO\source EAD2002 file] addMigrationMessages=false()`

* **outputUndeprecatedEAD3**: set to true() to produce an instance *with* elements deprecated in EAD3
* **outputUndeprecatedEAD3**: set to true() to produce an instance *with* elements deprecated in EAD3
* values: true() | false()
* default: false()
* default in EAD2002ToEAD3schema.xsl and EAD2002ToEAD3dtd.xsl: false()
* default in EAD2002ToEAD3schema_undeprecated.xsl and EAD2002ToEAD3dtd_undeprecated.xsl: true()
* **addMigrationComments**: set to false() to suppress comments in converted instance recording actions performed in the transformation
* values: true() | false()
* default: true()
* **addMigrationMessages**: set to false() to suppress messages sent to stderr reporting actions performed in the transformation
* values: true() | false()
* default: true()
* **outputValidation** set to rng, xsd, or dtd to indicate the desired type of validation schema for the output file
* values in EAD2002ToEAD3schema.xsl and EAD2002ToEAD3schema_undeprecated.xsl : rng | xsd
* default in EAD2002ToEAD3schema.xsl and EAD2002ToEAD3schema_undeprecated.xsl : rng
* value in EAD2002ToEAD3dtd.xsl and EAD2002ToEAD3dtd_undeprecated.xsl : dtd
* default in EAD2002ToEAD3dtd.xsl and EAD2002ToEAD3dtd_undeprecated.xsl : dtd
* **schemaPath** supplies path to the schema
* value: Default Value or Value Supplied by User
* default: ../../
* **schemaName** supplies schema filename
* values: ead3.rng | ead3_undeprecated.rng | ead3.xsd | ead3_undeprecated.xsd | ead3.dtd | ead3_undeprecated.dtd
* default: Determined by values of $outputValidation and #outputUndeprecatedEAD3
* **maintenancestatusValue**: supplies value for /ead/control/maintenancestatus
* values: revised | deleted | new | deletedsplit | deletedmerged | deletedreplaced | cancelled | derived
* default: revised
Expand Down
7 changes: 4 additions & 3 deletions samples/2002/beinecke.hayward.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ead xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink"
<ead xmlns="urn:isbn:1-931666-22-9"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.library.yale.edu/facc/schemas/ead/ead.xsd"
id="beinecke.hayward" altrender="altrender" audience="external" relatedencoding="enigma">
Expand All @@ -9,7 +10,7 @@
relatedencoding="DC">
<eadid countrycode="US" mainagencycode="US-CtY-BR"
publicid="-//Yale University::Beinecke Rare Book and Manuscript Library//TEXT (US::CtY-BR::::[ABRAHAM HAYWARD COLLECTION])//EN"
url="http://hdl.handle.net/10079/fa/beinecke.hayward" encodinganalog="eadid"
url="http://HDL.handle.net/10079/fa/beinecke.hayward" encodinganalog="eadid"
identifier="eadid:identifier" urn="eadid:urn">beinecke.hayward</eadid>
<filedesc altrender="filedesc" audience="external" encodinganalog="filedesc" id="filedesc1">
<titlestmt id="titlestmt1" encodinganalog="titlestmt" audience="external"
Expand Down Expand Up @@ -49,7 +50,7 @@
<date type="ead" normal="2006/2007">2006-2007</date>
<p>
<extref xlink:type="simple" xlink:actuate="onRequest" xlink:show="new"
xlink:href="http://hdl.handle.net/10079/9p8czk9">Copyright © <date
xlink:href="http://HDL.HANDLE.net/10079/9p8czk9">Copyright © <date
type="copyright" normal="1996/2007">1996-2007</date> by the Yale University
Library.</extref>
</p>
Expand Down
Loading

0 comments on commit f3546db

Please sign in to comment.