Harvesting stylesheet
Matthew Graham
mjg at cacr.caltech.edu
Thu Feb 28 00:05:22 PST 2008
Hi,
Partially to prove that it can be done, I've written an XSLT
stylesheet that will harvest from all registries in the Registry of
Registries and then write each resource record out to a separate file
with each registry having its own directory. Oh and it's only 81 lines
long!
The registry directories are named by the server part of their access
URL so, for example, records from http://msslxv.mssl.ucl.ac.uk:8080/astrogrid-registry/OAIHandlerv1_0
live in the directory msslxv.mssl.ucl.ac.uk.
The files corresponding to resource records are named according to
their IVORNs except that '/' in the IVORN are replaced with '_' so:
ivo://mssl.ucl.ac.uk/community/test.xml gets stored as
mssl.ucl.ac.uk_community_test.xml.
To run it, you'll a XSLT 2.0-capable XSL engine - I recommend Saxon.
Using this, the command to harvest is:
java -jar /path/to/saxon8.jar -it main autoharvest.xsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoharvest.xsl
Type: application/octet-stream
Size: 3316 bytes
Desc: not available
URL: <http://www.ivoa.net/pipermail/registry/attachments/20080228/5efe554c/attachment-0001.obj>
-------------- next part --------------
Cheers,
Matthew
More information about the registry
mailing list