root/tags/lgt2213/xml/htmlnt.cmd

Revision 746, 1.8 KB (checked in by pmoura, 5 years ago)

Updated and simplified scripts for new version of XT.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1@ECHO off
2
3SET JAVA_HOME=c:\jdk1.3
4
5SET XT_PATH=c:\xt
6
7SET XSLT=lgthtml.xsl
8REM SET XSLT=lgtxhtml.xsl
9
10IF "%1" == "" SET INDEX_TITLE=Entity documentation index
11IF NOT "%1" == "" SET INDEX_TITLE=%1%
12
13ECHO This script converts all .xml files in the current directory to .html
14ECHO files applying the XSLT transformation defined in the $XSLT file
15ECHO using the James Clark XT XSLT Java processor 20020426a or later version.
16ECHO.
17ECHO An index.html file, containing links to all .html documenting files,
18ECHO is automatically generated. This file uses the script optional parameter
19ECHO value as the title of the index.html file.
20ECHO.
21ECHO converting XML files to HTML...
22
23FOR /f "tokens=1-2 delims=." %%f IN ('DIR /b *.xml') DO IF EXIST %%f.html DEL %%f.html
24
25FOR /f "tokens=1-2 delims=." %%f IN ('DIR /b *.xml') DO %JAVA_HOME%\bin\java -cp "%XT_PATH%\xt.jar;%XT_PATH%\lib\xp.jar" -Dcom.jclark.xsl.sax.parser=com.jclark.xml.sax.CommentDriver com.jclark.xsl.sax.Driver %%f.xml %XSLT% %%f.html
26
27ECHO conversion done
28ECHO.
29ECHO generating index file...
30
31IF EXIST index.html DEL index.html
32
33ECHO ^<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"^> >> index.html
34ECHO ^<html^> >> index.html
35ECHO ^<head^> >> index.html
36ECHO ^<title^>%INDEX_TITLE%^</title^> >> index.html
37ECHO ^<link rel="stylesheet" href="logtalk.css" type="text/css"^> >> index.html
38ECHO ^</head^> >> index.html
39ECHO ^<body^> >> index.html
40ECHO ^<h1^>%INDEX_TITLE%^</h1^> >> index.html
41ECHO ^<ul^> >> index.html
42
43FOR /f "tokens=1-2 delims=." %%f IN ('DIR /b *.xml') DO ECHO ^<li^>^<a href="%%f.html"^>%%f^</a^>^</li^> >> index.html
44
45ECHO ^</ul^> >> index.html
46
47ECHO ^<p^>Generated on >> index.html
48DATE/T >> index.html
49TIME/T >> index.html
50ECHO ^</p^> >> index.html
51
52ECHO ^</body^> >> index.html
53ECHO ^</html^> >> index.html
54
55ECHO index file generated
56
57@ECHO on
Note: See TracBrowser for help on using the browser.