Changeset 28383

Show
Ignore:
Timestamp:
10.10.2013 19:43:27 (6 years ago)
Author:
ak19
Message:

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

Location:
gs2-extensions/xsd-to-gs-metaset
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/xsd-to-gs-metaset/Readme.txt

    r28364 r28383  
    883. Then run the script in this extension as follows: 
    99xsd_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 
    1013 
    1114This 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. 
     
    2326 
    2427The 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 
    2628 
    27 See more at Writing_XSL#Running_ApplyXSLT_to_apply_an_XSLT_file_from_the_command_line 
     29See more on the internal wiki page at Writing_XSL#Running_ApplyXSLT_to_apply_an_XSLT_file_from_the_command_line  
  • gs2-extensions/xsd-to-gs-metaset/xsd_to_mds.bat

    r28364 r28383  
    1111:: http://www.sourceware.org/ml/xsl-list/2002-03/msg00838.html 
    1212 
     13:: xsd input file and setName of mds file for output 
    1314set xsd=%1 
    1415set mds=%2 
    1516 
    16 if not exist %1 echo XSD file %1 does not exist.& goto exit 
     17if not exist %xsd% echo XSD file %xsd% does not exist.& goto exit 
    1718 
    1819 
     
    2930set xsl=%outputdir%\gli\classes\xml\xsd-to-mds.xsl 
    3031 
    31 :: See http://internal.greenstone.org/wiki/Writing_XSL#Running_ApplyXSLT_to_apply_an_XSLT_file_from_the_command_line 
     32if not exist %xsl% echo XSLT file %xsl% can't be found.& goto exit 
     33 
     34:: See internal wiki page Writing_XSL#Running_ApplyXSLT_to_apply_an_XSLT_file_from_the_command_line 
    3235set xcmd=java -cp "%GSDLHOME%/bin/java/xalan.jar";"%GSDLHOME%/bin/java/ApplyXSLT.jar";"%GSDLHOME%/bin/java/." org.nzdl.gsdl.ApplyXSLT -t "%xsl%" -x "%xsd%" -o "%outputfile%" 
    3336 
     
    4548 
    4649:usage 
     50echo. 
    4751echo Run as %0 ^<xsd file^> ^<namespace^> ^<setname (mds file name)^> 
     52echo. 
    4853:: E.g. xsd_to_mds.bat C:\<full-path>\CDWALite-xsd-public-v1-1.xsd cdwalite CDWALite 
    4954