$Id$ Tools to assist in writing RCC 2629 XML documents. This is a snapshot of a work in progress. GNUmakefile: Hairy makefile for GNU make. Run this in a directory with the source for your document. Handles search paths (via environment variable, make command line, or just edit the makefile to fit your system), automatic dependency checking and rule generation (looks for docName attribute in element of your XML files), lint checking, XInclude expansion. Uses libxml2/libxslt for much of the work, thus gets the benefit of emacs-compatable syntax error messges and so forth. Warning: uses GNU make $(eval ...) operator, which is buggy in GNU make 3.80 (and perhaps earlier versions). Works fine with GNU make 3.81. GNUmakefile-helper.xsl: Dependency checker for use by GNUmakefile. Understands both xml2rfc and W3C XInclude. expand-rfc2629-pi-rfc-include.xsl: XSLT code to expand xml2rfc processing instructions. xsltproc (my preferred XSLT processor) has built-in support for XInclude, so running a RFC 2629 XML file through this transformation handles both kinds of inclusion. fetch-references.sh: Filename is a bit of a misnomer, and is subject to change. This is a self-contained shell script suitable for running under cron to keep a local stash of RFCs, Internet-Drafts, and RFC 2629 references up to date. It includes code for downloading reference files from xml.resource.org, but also includes code for generating reference files directly from rfc-index.xml and 1id-index.txt. Also generates two other output files: an XML database of Internet-Drafts used by Julian Reschke's check-references.xslt script (a handy little tool for figuring out what changes you need to make to your references section to account for what everybody else has been doing since the last time you submitted your draft), and a BiBTeX database generated from the RFC index. rfc2629.dtd.diff: There's no free lunch. Using XInclude instead of xml2rfc requires some additions to the RFC 2629 DTD, at least if you're going to validate your XML (if you don't care about validation, you can ignore this). Apply this patch to rfc2629.dtd to make the necessary changes. I probably went a bit overboard on this (no doubt the minimal necessary change is smaller than this patch), but the idea was to allow XInclude everywhere that one might reasonably want to use XInclude. Given that my first exposure to RFC 2629 was as part of an editing team working on three documents scattered in 80+ XML source files (one file per major document section or example, plus some extras just because it seemed like a good idea at the time...), my gut reaction upon facing this question was that XInclude should be allowed pretty much anywhere. Feel free to make a better suggestion. One can, of course, simply perform XInclude processing without validation, strip out the attributes aded by XInclude processing, then validate the result, which works fine with the vanilla DTD. The only problem is that one is then validating the processed copy rather than the original source file, which is inconvenient. With the extended DTD, one can validate in place (see the "validate" target in the GNUmakefile) and xmllint will helpfully point out the offending source line in a way that emacs understands. Integrated development environments are nice, so long as they're emacs. xml: Files in the xml/ subdirectory are either downloaded or generated by fetch-references.sh.