Entity-related classes are dynamically selected:
|New classes can be registered at any time.|
|Registry entries can be defined in an XML config. file.|
|Registry entries can be defined in any XML document.|
|Works very well in practice ...|
|... but has its limits ...|
[Demo: Tools|View/edit registered XML entity types]
The Node Type Registry is an in-memory table of the standard XML entity types and particular element types (by name). Each registry entry identifies the Java classes to be used for processing this type of entity. Four types of classes can be registered:
Consequently, all processing is very dynamic, and can easily be changed or enhanced with little (or no) changes to the calling application. The Tools|View/edit registered XML entity types dialog allows all entries to be edited directly, and new entries added. This is an interesting development/debugging facility!
New entries can be added at any time. Registry entries can be defined in an XML configuration file (using the 'NodeType' element). Indeed, registry entries can be placed in any XML file; as long as they precede in the file the elements to which they relate, those elements will be processed according to the new registry entries.