XML Authority can import SGML DTDs for conversion to XML schemas. XML doesn't support all of the capabilities of SGML DTDs, but XML Authority uses a sophisticated set of rules to include as much of the information provided in the SGML DTD as possible. If information provided in the SGML DTD cannot be included, it is reported in the Errors pane. The detailed rules used by XML Authority (for handling SGML usage outside of XML's capabilities) are presented at the bottom of this document.
To import an SGML DTD, select the SGML DTD option from the Import submenu of the File menu. The dialog box shown in Figure A will ask you to locate the SGML DTD. Select the file, and click the Open button.
Figure A - Selecting an SGML DTD to import
XML Authority will then load and parse the DTD, converting it to XML internally and presenting a list of errors (shown below in Figure B), if there are any. Errors marked with red selectors are problems that will need manual correction - the declaration arrived without a complete set of information that can be used by XML. Yellow selectors indicate problems that XML Authority was able to correct, though they may have required minor modifications to the imported information. Green selectors are informational, indicating problems that XML Authority has already fixed, typically the use of SGML data types that XML doesn't support. In these cases, though there has been a change, the schema developer shouldn't need to make any modifications.
Figure B - Error reporting for a typical large SGML DTD
You can click on the errors shown in the error pane to modify the original source when appropriate. Clicking on the error message will take you to the source of the error. If the error was an error on import, you'll be able to edit the original imported material and reparse it. (The header in the file will indicate that the material you are editing is "Original Source" from an import.)
When you have finished correcting errors, you can return to the other panes of XML Authority and begin editing your DTD, as shown below in Figure C.
Figure C - Editing the DTD in XML Authority
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516