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

Last change on this file since 28364 was 28364, checked in by jlwhisler, 11 years ago

Adding in a new extension to demonstrate how to use the xsd-to-mds.xsl XSLT file that Jenny recently added, to regenerate the CDWA-Lite file. This extension contains a batch script and a Readme file.

File size: 1.5 KB
RevLine 
[28364]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
11This 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.
12
13The 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.
14
15
16To manually run ApplyXSLT, to apply the XSLT file from the command line:
17
18C:\GSDLHOME\bin\java>
19java -cp xalan.jar;ApplyXSLT.jar;. org.nzdl.gsdl.ApplyXSLT
20-t C:\GSDLHOME\gli\classes\xml\xsd-to-mds.xsl
21-x C:\full-path\CDWALite-xsd-public-v1-1.xsd
22-o C:\GSDLHOME\gli\metadata\check.mds
23
24The 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.
25Specifying the output type and indentation
26
27See more at Writing_XSL#Running_ApplyXSLT_to_apply_an_XSLT_file_from_the_command_line
Note: See TracBrowser for help on using the repository browser.