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
|
Rev | Line | |
---|
[28364] | 1 | To regenerate the cdwalite.mds file:
|
---|
| 2 |
|
---|
| 3 | 1. Download the XSD xml file descriptor for CDWALite http://www.getty.edu/CDWA/CDWALite/CDWALite-xsd-public-v1-1.xsd
|
---|
| 4 | More information about CDWALite can be found at http://www.getty.edu/research/publications/electronic_publications/cdwa/cdwalite.pdf
|
---|
| 5 |
|
---|
| 6 | 2. Source setup or gs3-setup in your GS2/GS3.
|
---|
| 7 |
|
---|
| 8 | 3. Then run the script in this extension as follows:
|
---|
| 9 | xsd_to_mds.bat C:\<full-path>\CDWALite-xsd-public-v1-1.xsd cdwalite CDWALite
|
---|
| 10 |
|
---|
| 11 | This 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 |
|
---|
| 13 | The 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 |
|
---|
| 16 | To manually run ApplyXSLT, to apply the XSLT file from the command line:
|
---|
| 17 |
|
---|
| 18 | C:\GSDLHOME\bin\java>
|
---|
| 19 | java -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 |
|
---|
| 24 | The 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.
|
---|
| 25 | Specifying the output type and indentation
|
---|
| 26 |
|
---|
| 27 | See 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.