all: sample.html sample.pdf

clean:
	rm -f sample.aux sample.fo sample.log sample.out sample.html sample.pdf

sample.html: sample.xml custom_html.xsl
	export SGML_CATALOG_FILES=/usr/lib/sgml/catalog ; \
	xsltproc \
	--catalogs \
	-o sample.html \
	custom_html.xsl sample.xml

sample.pdf: sample.xml custom_fo.xsl
	export SGML_CATALOG_FILES=/usr/lib/sgml/catalog ; \
	xsltproc \
	--catalogs \
	-o sample.fo \
	custom_fo.xsl sample.xml
	pdflatex "&pdfxmltex" sample.fo
