xm-tool Using XM::PP

The pp script was one of the more complex perl script that I (guidod) wrote to handle xml'ish data. It may prove to be useful to you, since it can be easily extended with functionality - and of course that could also be sub-calls into xm-tool perl snippets.
(this is document is still incomplete, sorry)

With the integration into the xm-tool processing chain, there is also a xm::pp_maybe script, that will only call xm::pp if the file starts with a line saying "<!doctype whatever>" The space-seperated list of entries after that doctype-spec does not read exactly like the doctype spec from the sgml times, it is just a series of names of xm-tool pm-modules and their pp-intializations scripts with an xm-extension.

If they don't live locally, the xm-tool's xm::doctype::* path is searched (under the perl's @INC path of course). Therefore, specifying a "<!doctype html include umlaut>" happens to load:
use xm::doctype::html
xm::pp xm/doctype/html.xm
use xm::doctype::include.pm
xm::pp xm/doctype/umlaut.xm

(need to extend documentation here, please have a look into the provided doctype .pm and .xm to see how easy it is to add new snippets to the xm::pp processor - and note that colontags.pm has been use-referenced from both a doctype and it can be used globally in a normal Makefile pipe-chain with xm-perl directly)

In the opensource world, the source code is your friend - look at it, learn from it, tweak it, submit sth. from it.
(now go and look into xm/pp.pm, it has some fine comments embedded)


2000-02-03 xm-tool guidod