Thoughts and Notes Ideas that stay with me long enough to get written down

21Mar/060

Eclipse and DITA

One of the challenges I've found in working with DITA is managing the build process, specifically my ant build files. Since ant build files are in XML, I've been using my XML editors (either oXygen or Stylus Studio) to work on them. Although they help a bit, since ant build files don't have a schema or DTD, they don't help too much.
I started using emacs, and that was easier, mostly because I am more familiar with emacs as a text editor than either of my XML tools. Then I thought I'd take a look at Eclipse. I'm glad I did.
Eclipse takes a little while to set up, but once you've created a project, it's very easy to work with. The biggest advantage of working in Eclipse when working with DITA projects is that you can easily find all your build targets and edit them. DITA 1.0.1 has multiple XML files that store build targets - build.xml, pretargets.xml and conductor.xml. When you are trying to debug the build process, it's very hard to figure out which file has which target. Eclipse helps you with that. Open build.xml, and it lists, in outline form, all the targets available, including those that are in imported files. The imported targets are clearly marked, and you can double-click on them to open that file at the appropriate target.
Since Eclipse understand ant build files, editing them is also much easier. Tasks, parameters (variables? I get confused with ant syntax), and macros are all available from the auto-complete menus. That alone has saved me hours of debug time.
Another advantage is that there is an oXygen plug-in for Eclipse, so if you own oXygen, you can do some pretty sophisticated editing and debugging without every leaving Eclipse.
I still need to figure out how to kick off the ant builds from within Eclipse, but the time I've saved by using Eclipse has been a real help.