Last change
on this file since 31039 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 | |
---|
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 | On Linux:
|
---|
12 | ./xsd_to_mds.bash /<full-path>/CDWALite-xsd-public-v1-1.xsd cdwalite CDWALite
|
---|
13 |
|
---|
14 | 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.
|
---|
15 |
|
---|
16 | 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.
|
---|
17 |
|
---|
18 |
|
---|
19 | To manually run ApplyXSLT, to apply the XSLT file from the command line:
|
---|
20 |
|
---|
21 | C:\GSDLHOME\bin\java>
|
---|
22 | java -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 |
|
---|
27 | 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.
|
---|
28 |
|
---|
29 | See 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.