diff --git a/make-includes/build_misc_rules.make b/make-includes/build_misc_rules.make index da69c83..4ad3df2 100755 --- a/make-includes/build_misc_rules.make +++ b/make-includes/build_misc_rules.make @@ -78,7 +78,7 @@ # help, unfortunately. Bugger :( # #XSLT_STYLESHEETS:=$(shell $(JAVA) org.apache.xml.resolver.apps.resolver -u file:///xml2html.xsl uri | ( $(GREP) 'Result: file:' || $(ECHO) '::xml2html.xsl' ) | $(CUT) -d':' -f3-) $(shell $(JAVA) org.apache.xml.resolver.apps.resolver -u file:///xml2latex.xsl uri | ( $(GREP) 'Result: file:' || $(ECHO) '::xml2latex.xsl' ) | $(CUT) -d':' -f3-) -XSLT_STYLESHEETS:=$(TEACHING_SHARED)/Authoring/XML/xml2html.xsl $(TEACHING_SHARED)/Authoring/XML/xml2latex.xsl +XSLT_STYLESHEETS:=$(TEACHING_SHARED)/Authoring/XML/xml2html.xsl $(TEACHING_SHARED)/Authoring/XML/xml2xhtml.xsl $(TEACHING_SHARED)/Authoring/XML/xml2latex.xsl $(TEACHING_SHARED)/Authoring/XML/xml2xelatex.xsl ################################################################################ @@ -169,12 +169,20 @@ web-questions: $(WEB_QUESTIONS_HTML) $(WEB_IMAGES) $(WEB_FILES) $(WEB_QUESTIONS_HTML): %-questions.html: %-derived.xml +ifdef UNICODE + $(call xslt,$<,xml2xhtml.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'no'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'png')) > $@ +else $(call xslt,$<,xml2html.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'no'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'png')) > $@ +endif web-answers: $(WEB_ANSWERS_HTML) $(WEB_IMAGES) $(WEB_FILES) $(WEB_ANSWERS_HTML): %-answers.html: %-derived.xml +ifdef UNICODE + $(call xslt,$<,xml2xhtml.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'yes'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'png')) > $@ +else $(call xslt,$<,xml2html.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'yes'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'png')) > $@ +endif else web: $(WEB_HTML) $(WEB_IMAGES) $(WEB_FILES) endif @@ -192,14 +200,22 @@ $(PRINT_QUESTIONS_PDF_1UP): $(PRINT_IMAGES) $(PRINT_FILES) $(PRINT_QUESTIONS_TEX): %-questions.tex: %-derived.xml +ifdef UNICODE + $(call xslt,$<,xml2xelatex.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'no'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'pdf')) > $@ +else $(call xslt,$<,xml2latex.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'no'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'pdf')) > $@ +endif print-answers: $(PRINT_ANSWERS_PDF_1UP) $(PRINT_ANSWERS_PDF_2UP) $(PRINT_ANSWERS_PDF_1UP): $(PRINT_IMAGES) $(PRINT_FILES) $(PRINT_ANSWERS_TEX): %-answers.tex: %-derived.xml +ifdef UNICODE + $(call xslt,$<,xml2xelatex.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'yes'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'pdf')) > $@ +else $(call xslt,$<,xml2latex.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'yes'),$(call xslt_parameter,showanswers,'yes'),$(call xslt_parameter,base-path,'.'),$(call xslt_parameter,image-format,'pdf')) > $@ +endif else print: $(PRINT_PDF_1UP) $(PRINT_PDF_2UP)