Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

XsltCrosswalk.zip  

Configurable XSLT-driven Crosswalk

...

The pluginName is the plugin name given to the Plugin Manager, and the path value is the pathname (relative to [dspace]/config/) of the crosswalk stylesheet, e.g.

...

 "mycrosswalk.xslt".

For example, this configures a crosswalk named "LOM" using a stylesheet in

...

Code Block
crosswalk.dissemination.MODS.stylesheet = crosswalks/mods_out.xsl
crosswalk.dissemination.MODS.namespace.mods = <nowiki>httphttp://www.loc.gov/mods/v3</nowiki>v3
crosswalk.dissemination.MODS.schemaLocation = <nowiki>httphttp://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-0.xsd</nowiki>xsd

You can configure two (or more) names to point to the same crosswalk, just add two configuration entries with the same path, e.g.

Code Block
crosswalk.submission.MyFormat.stylesheet = crosswalks/myformat.xslt
crosswalk.submission.almost_DC.stylesheet = crosswalks/myformat.xslt

Testing

...

Dissemination Crosswalks

With DSpace up to version 1.8.2

...

You you can test dissemination stylesheets very easily by configuring an OAI-PMH output format in the OAI configuration file, named the same as your dissemination plugin and implemented by org.dspace.app.oai.PluginCrosswalk. Then just request a document's metadata in the given format to see what the disseminator produces.

The new OAI in DSpace 3.0 uses the "xoai" format as input so stylesheets expecting the "DIM" format do not apply. From DSpace 3.1 on it is possible to test dissemination crosswalks by using a command line utility. To invoke the dissemination crosswalk tester, run the class XSLTDisseminationCrosswalk as follows:

Code Block
[dspace]/bin/dspace dsrun org.dspace.content.crosswalk.XSLTDisseminationCrosswalk <plugin name> <handle> [output-file]

For example, you can test the marc plugin on the handle 123456789/3 with:

Code Block
[dspace]/bin/dspace dsrun org.dspace.content.crosswalk.XSLTDisseminationCrosswalk marc 12345678/3

Informations from the script will be printed to stderr while the XML output of the dissemination crosswalk will be printed to stdout. You can give a third parameter containing a filename to write the output into a file, but be careful: the file will be overwritten if it exists.

Testing Ingestion Crosswalks

To help you test submission stylesheets, the XSLT ingestion crosswalk includes a command-line utility, since otherwise you would have to try ingesting a new Item for each test. The utility transforms a metadata
document you supply in a file and returns the resulting DIM.

...

Auto-reloading

Code Block
PluginManager
Panel

 

 

This plugin will automatically reload any XSL stylesheet that was modified since it was last loaded. This lets you edit and test stylesheets without restarting DSpace.