XML Tangle (or just xmltangle) is a tool to implement the "tangle" portion of Donald Knuth's Literate Programming. Traditional stylesheet utilities can be used for the weave (CSS/DSSSL/XSLT/etc). It uses processing instructions, so it can be used with any DTD that you like.