A Scheme for XInclude-ing SVG into HTML

Write XInclude's in a file bearing a distinct extension (such as.inc)

You may either arrange to include a whole SVG file:

<xi:include
   href="IMAGE.svg"
   xmlns:xi="http://www.w3.org/2001/XInclude" />

Now, I don't seem to manage to include an element from another file, possibly because ordinary HTML files are not fully XML-conformant.

write Makefile rules to resolve FILE.html.inc FILE.html

You could add a generic rule such as:

%.res.html : %.html.inc
	$(RESOLVE) --output $@   $<

which commits you to appending an un-HTML extension (here .inc) to unresolved HTML files.

If you want to resolve a file whenever the source file has changed you need to write a Makefile for each file.

For instance, if graphic.res.html includes an SVG in file format named pic33.svg and an SVG element found in picture-source.html, then your Makefile rule would look like much like:

graphic.html : graphic.html.inc picture-source.html pic33.svg
	$(RESOLVE) --output $@   $<