+override pages := $(patsubst sources/%.xml,public/%/index.html,$(pagesources))
+
+override resourcesources := $(wildcard $(addsuffix /*,$(basename $(pagesources))))
+override resources := $(patsubst sources/%,public/%,$(resourcesources))
+
+override feedsources := $(filter-out $(resourcesources),$(wildcard sources/*.atom sources/*/*.atom))
+override feeds := $(patsubst sources/%.atom,public/%.atom,$(feedsources))
+
+override content := $(indices) $(pages)
+
+# This function does the following :—
+#
+# • Calls `transform.xslt` with the `$(1)`, providing `$(BASEIRI)` and `$(DATETIME) as params and providing `$(2)` (minus the initial `public/`) as the param `OUTPUTPATH`.
+#
+# • Removes any `xmlns` prefix declarations from output to `.html` files (with `sed`).
+#
+# • Removes any doctype for root elements other than `html` (with `grep -v`).
+#
+# • Saves the output to `$(2)`.
+override makexslt = $(XSLT) --nonet --novalid $(XSLTOPTS) --stringparam BASEIRI "$(BASEIRI)" --stringparam DATETIME "$(DATETIME)" --stringparam OUTPUTPATH "$(patsubst public/%,/%,$(2))" transform.xslt $(1)\
+ $(if $(filter %.html,$(2)),| sed 's/ xmlns:[0-9A-Za-z_-]*="[^"]*"//g',)\
+ | grep -v '^<!DOCTYPE \([^h]\|.[^t]\|..[^m]\|...[^l]\|....[^ >]\)'\
+ > $(2)