forked from OASIS-XDI-Technical-Committee/xdi-spec-docbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oasis-specification.bat
55 lines (42 loc) · 2 KB
/
oasis-specification.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off
goto :start
Configured for 0.6
Windows batch file for publishing an OASIS specification DocBook XML instance
Assumes three batch files exist in the system:
xmldtd input-XML-file
xslt input-XML-file stylesheet-XSL-file output-file
xslfo-pdf input-FO-file output-PDF-file
$Id: oasis-specification.bat,v 1.13 2011/11/09 17:56:15 admin Exp $
:start
if a%2 == a goto :error
rem The last of the following set commands is the one engaged
set oasis-ss-dir=http://docs.oasis-open.org/templates/DocBook/spec-0.6/stylesheets/
set oasis-ss-dir=c:/oasis/spec-0.6/stylesheets/
echo Validating instance...
call xmldtd oasis-specification-%1-%2.xml
if %errorlevel% neq 0 goto :done
echo Making offline HTML...
call xslt oasis-specification-%1-%2.xml %oasis-ss-dir%oasis-specification-html-offline.xsl oasis-specification-%1-%2-offline.html
if %errorlevel% neq 0 goto :done
echo Making online HTML...
call xslt oasis-specification-%1-%2.xml %oasis-ss-dir%oasis-specification-html.xsl nul automatic-output-filename=yes
if %errorlevel% neq 0 goto :done
echo Making relative HTML...
call xslt oasis-specification-%1-%2.xml %oasis-ss-dir%oasis-specification-html.xsl oasis-specification-%1-%2-relative.html html.stylesheet=css/oasis-spec.css oasis.logo=OASISLogo.jpg
if %errorlevel% neq 0 goto :done
echo Making XSL-FO US...
call xslt oasis-specification-%1-%2.xml %oasis-ss-dir%oasis-specification-fo-us.xsl nul automatic-output-filename=yes
if %errorlevel% neq 0 goto :done
echo Making PDF US...
call xslfo-pdf oasis-specification-%1-%2.fo oasis-specification-%1-%2-us.pdf
if %errorlevel% neq 0 goto :done
echo Making XSL-FO A4...
call xslt oasis-specification-%1-%2.xml %oasis-ss-dir%oasis-specification-fo-a4.xsl nul automatic-output-filename=yes
if %errorlevel% neq 0 goto :done
echo Making PDF A4...
call xslfo-pdf oasis-specification-%1-%2.fo oasis-specification-%1-%2.pdf
if %errorlevel% neq 0 goto :done
goto :done
:error
echo Missing version of document as first argument and stage as second argument
:done