SAA-SDT / EAD2002toEAD3

XSLT Transformations to convert EAD2002 instances to EAD3
9 stars 0 forks source link

EAD2002toEAD3

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

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, and with the filename of the preferred style sheet

Windows:

$ 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/ead2002toEAD3schema.xsl] -s:[/PATH/TO/source EAD2002 file]

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

Note that the oXygen XML Editor (http://www.oxygenxml.com/) comes bundled with Saxon 9.x. Instructions on running XSLT transformations in the latest version of oXygen (17.1) may be found at: http://www.oxygenxml.com/doc/versions/17.1/ug-editor/#concepts/transformation-scenario.html

Parameters

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\ead2002toEAD3schema.xsl] -s:[\PATH\TO\source EAD2002 file] addMigrationMessages=false()

Known Issues

For descriptions of outstanding issues see: https://github.com/SAA-SDT/EAD2002toEAD3/issues/

Given an EAD2002-valid source, in most cases ead2002toEAD3.xsl should produce valid EAD3 instances with little or no data loss, especially for source files valid agains the EAD2002 W3C XML Schema a RelaxNG schemas. However, instances valid against the EAD 2002 DTD which make use of external entity references may fail .

Please report any bugs or other issues at the issue tracker for this project https://github.com/SAA-SDT/EAD2002toEAD3/issues/new