source: gs2-extensions/xsd-to-gs-metaset/Readme.txt@ 28802

Last change on this file since 28802 was 28383, checked in by ak19, 11 years ago

Added a bash script equivalent to the batch script added yesterday. Updated the Readme file and minor changes to the batch file too.

File size: 1.6 KB
Line 
1To regenerate the cdwalite.mds file:
2
31. Download the XSD xml file descriptor for CDWALite http://www.getty.edu/CDWA/CDWALite/CDWALite-xsd-public-v1-1.xsd
4More information about CDWALite can be found at http://www.getty.edu/research/publications/electronic_publications/cdwa/cdwalite.pdf
5
62. Source setup or gs3-setup in your GS2/GS3.
7
83. Then run the script in this extension as follows:
9xsd_to_mds.bat C:\<full-path>\CDWALite-xsd-public-v1-1.xsd cdwalite CDWALite
10
11On Linux:
12./xsd_to_mds.bash /<full-path>/CDWALite-xsd-public-v1-1.xsd cdwalite CDWALite
13
14This script uses the GSDLHOME/bin/java/ApplyXSLT to apply the XSLT file gli\classes\xml\xsd-to-mds.xsl to the downloaded input xsd file. It thereby generates an *.mds file (using the name given in the 3rd argument) in gli's metadata folder.
15
16The 2nd and 3rd argument are not used in the XSLT file at present as their values are still hardcoded in the XSLT, but they will shortly be accepted as parameters that the ApplyXSLT java will pass to the XSLT file.
17
18
19To manually run ApplyXSLT, to apply the XSLT file from the command line:
20
21C:\GSDLHOME\bin\java>
22java -cp xalan.jar;ApplyXSLT.jar;. org.nzdl.gsdl.ApplyXSLT
23-t C:\GSDLHOME\gli\classes\xml\xsd-to-mds.xsl
24-x C:\full-path\CDWALite-xsd-public-v1-1.xsd
25-o C:\GSDLHOME\gli\metadata\check.mds
26
27The above takes the xsLt file xsd-to-mds.xsl and applies it to the input Xml file (CDWALite-xsd-public-v1-1.xsd) to generate the Output file check.mds.
28
29See more on the internal wiki page at Writing_XSL#Running_ApplyXSLT_to_apply_an_XSLT_file_from_the_command_line
Note: See TracBrowser for help on using the repository browser.