rem
rem transform docbook to pdf
rem

echo off

set CURDIR=%cd%
set XML_CATALOG_FILES=%CURDIR%\catalog.xml
set XML_DEBUG_CATALOG=1

echo transforming guide.xml to guide.fo
cd guide
..\bin\xsltproc.exe --xinclude ..\stylesheets\subcommander-fo.xsl guide.xml > guide.fo 2>..\guide.log
cd ..
echo ..done.

rem echo transforming guide.fo to guide.pdf
rem call c:\Tools\xep\xep.bat -fo guide.fo -out guide.pdf >>doc.log 2>&1
rem echo ..done.

echo transforming guide.fo to guide.pdf
cd guide
set XEP="C:\Tools\xep"
set CP="%XEP%\lib\xep383_client.jar;%XEP%\lib\saxon.jar;%XEP%\lib\xt.jar;%XEP%\lib\resolver.jar;%CURDIR%"
java -classpath %CP% com.renderx.xep.XSLDriver -Dcom.renderx.sax.entityresolver=org.apache.xml.resolver.tools.CatalogResolver -Dcom.renderx.jaxp.uriresolver=org.apache.xml.resolver.tools.CatalogResolver -DROOT="%XEP%" -fo guide.fo -out ..\guide.pdf >>..\guide.log 2>&1
cd ..
echo ..done.

rem how do i make xep find the draft.png??
rem -Dcom.renderx.jaxp.uriresolver=
rem -Dcom.renderx.sax.entityresolver=
rem org.apache.xml.resolver.tools.ResolvingXMLReader
rem org.apache.xml.resolver.tools.CatalogResolver

rem xsltproc doesn't like the file:// in the catalog file and java doesn't like
rem it wthout, so we have a cat-xsltproc.xml and a cat-java.xml
