Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

attribute.
These are configured on additional properties in the DSpace Configuration, i.e.:

Code Block

 crosswalk.dissemination.'''pluginName'''.namespace.'''prefix''' = '''namespace-URI'''
 crosswalk.dissemination.'''pluginName'''.schemaLocation = '''Schema Location string'''
 crosswalk.dissemination.'''pluginName'''.preferList = '''boolean'''

...

Code Block
MODS

:

Code Block

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

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 Stylesheets

Info

This first tip applies to OAI in DSpace up to version 1.8.2. It no longer applies to the new OAI in DSpace 3.0, because stylesheets in take the "xoai" format as input, not the "DIM" format as the old OAI.

You can test dissemination stylesheets very easily by configuring an
OAIan OAI-PMH output format in the OAI configuration file, named the same as
your as your dissemination plugin and implemented by

...

by org.dspace.app.oai.PluginCrosswalk

...

. Then just request a document's
metadata s metadata in the given format to see what the disseminator produces.

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

To invoke the crosswalk tester, run the class as follows:

Code Block

 [dspace]/bin/dspace dsrun org.dspace.content.crosswalk.XSLTIngestionCrosswalk '''plugin input-file''' <plugin name> <input-file>

For example, you can test the

...

LOM

...

plugin  plugin on the file

...

file test.xml

...

with:

Code Block

 [dspace]/bin/dspace dsrun org.dspace.content.crosswalk.XSLTIngestionCrosswalk LOM test.xml

Add the

...

-l

...

option  option to pass the submission stylesheet a list of elements
instead elements instead of a whole document, as if the List form of the

...

the ingest()

...

method
had  method had been called, e.g.:

Code Block

 [dspace]/bin/dspace dsrun org.dspace.content.crosswalk.XSLTIngestionCrosswalk -l LOM test.xml

In any case, the output will be prettyprinted XML of the DIM document
returned document returned by the stylesheet.

Usage

You must use the

...

to instantiate an XSLT crosswalk plugin, e.g.

Code Block

 IngestionCrosswalk xwalk = PluginManager.getPlugin(IngestionCrosswalk.class, "LOM");

...