Importing DTDs

New types can be added to Nodose by importing an existing XML DTD. There must also be an associated XML file that references the DTD. To import a DTD, select "Import DTD" from the Tools menu and identify the XML file that uses the DTD using the open file dialog. The importer will create new types in Nodose that correspond to the elements in the DTD. All atomic types (#PCDATA) will be assumed to be strings. To specify that an atomic type is an integer or a float, define an attribute named "integer" or "float".


As an example, consider the following fragment of a DTD:

<!ELEMENT roster (name,age)* >
<!ELEMENT name (#PCDATA) >
<!ELEMENT age (#PCDATA) >
<!ATTLIST age INTEGER CDATA #IMPLIED >

The DTD importer will create the new atomic types "name" (string) and "age" (integer). It will also create a type that represents a single roster entry and a list of entries called "roster".



The current implementation of the DTD importer uses the IBM Java Parser.