Reactor XML Document Type Definition (DTD)

Reactor is provided with a Document Type Definition (DTD) file that can be used to validate your XML configuration file.  The DTD, reactor.dtd, is located under the "/reactor" directory.  It is not necessary to use the DTD file, but it may be of assistance in validating your  configuration.   This can be of particular use when you receive an error that appears related the configuration file.
 
To use the DTD place it in the same directory as your XML configuration file.  Edit your configuration xml file and add a doctype reference to the top of the document.  For example:
 

<!DOCTYPE reactor SYSTEM "Reactor.dtd">
<reactor />

 

Note: The above is actually a valid configuration file, but does not define reactor's configuration nor any relationships so it's rather useless.  To actually use the file you would need to instantiate a config object and pass it into the reactorFactory when it's instantiated.  This is useful when working with a third party IOC container such as ColdSpring.

 
The DTD can be used by most XML editors to validate your XML configuration file.  For example, if you are editing your XML configuration file  using DreamWeaver you could simply run the validator by clicking File > Check Page > Validate Markup.  Errors will be shown in the Results page.
 
Other developers like to use XMLBuddy with Eclipse.  With XMLBuddy you can click XML > Validate to validate the document.
 
Beyond this, it's up to you to figure out how to (or if you plan to) use the DTD.