HTMLSTYLE=stripshow-html.xsl
PDFSTYLE=stripshow-fo.xsl
export XML_DEBUG_CATALOG=0
export XML_CATALOG_FILES=/opt/local/etc/xml/catalog

stripshow-user-guide.pdf: stripshow.xml
	xsltproc -o stripshow.pdf.fo stripshow-fo.xsl $<
	fop -fo stripshow.pdf.fo -pdf stripshow-user-guide.pdf
	
%.html: %.xml
	xsltproc  --output  $@  $(HTMLSTYLE)  $<

%.pdf: %.xml
	xsltproc --output $@.fo $(PDFSTYLE) $<
	fop -fo $@.fo $@
	rm $@.fo

html:
	xsltproc -o stripshow.html stripshow-html.xsl stripshow.xml
	
check:
	xmllint --valid --noout stripshow.xml

stock:
	xsltproc -o stripshow.pdf.fo /opt/local/share/xsl/docbook-xsl/fo/docbook.xsl stripshow.xml
	fop -fo stripshow.pdf.fo -pdf stripshow.pdf

saxon:
	java -cp /opt/local/share/xsl/docbook-xsl/extensions/saxon65.jar:/opt/local/share/java/saxon.jar com.icl.saxon.StyleSheet -o stripshow.pdf.fo stripshow.xml /opt/local/share/xsl/docbook-xsl/fo/docbook.xsl
	fop -fo stripshow.pdf.fo -pdf stripshow-user-guide.pdf

pretty: stripshow.xml
	xsltproc --output mytitlepage.xsl \
	/opt/local/share/xsl/docbook-xsl/template/titlepage.xsl \
	./titlepage.templates.xml
	xsltproc -o pretty.pdf.fo pretty-fo.xsl $<
	fop -c /Users/bhawkins/foptest.xml -fo pretty.pdf.fo -pdf pretty.pdf

test: test.xml
	xsltproc --output mytitlepage.xsl \
	/opt/local/share/xsl/docbook-xsl/template/titlepage.xsl \
	./titlepage.templates.xml
	xsltproc -o test.pdf.fo pretty-fo.xsl $<
	fop -c /Users/bhawkins/foptest.xml -fo test.pdf.fo -pdf test.pdf

	
clean:
	rm stripshow-user-guide.pdf
	rm stripshow.pdf.fo