Select File>New... or File>New Document... to create a new xml document.
|
|
To create a new document from the toolbar select the New icon
in the Toolbar
and select Document in the Select New window choice
list. Click on the OK button.
|
|
A Catalogs window is opened. The Catalogs window has tabs for different DTD/XML Schema categories.
|
|
Select a DTD/Schema type tab to create a new document. For example, select J2EE 1.4 to create a J2EE xml document. Select a type of xml document from the Select an entry box, EJB 2.1 for example, and click on the OK button.
|
|
A window with title as the selected xml document type is opened. For example if J2EE 1.4>Ejb 2.1 is selected, a window with title Ejb 2.1 is opened. The General tab is selected by default. Specify document name in the Name field, the document directory in the Directory field and the document description in the Description field. Click the Next button.
|
|
The Spec tab is selected. For a standalone application select the Standalone checkbox. Specify the path for the schema corresponding to the xml document in the Schema Path or URI field. Specify the path for the DTD corresponding to the xml document in the DTD Path or URI field. Specify the DTD Public Id in the DTD PUBLIC ID field. Specify the XML document root element in the Root Element field. The Spec fields values are specified by the XML Editor when the corresponding values are specified in catalogs.xml. Click on the Next button.
|
|
Select the file extension type in the File Extension choice list. The file extension is .xml for an XML document, .xslt for an Xslt document, .xsd for a W3C Schema document and .tld for a J2EE custom tag library descriptor type of document.
|
|
Select the document encoding from the Encoding choice list. Click the Next button.
|
|
The Target Namespace tab gets selected. If applicable, specify the target namespace prefix in the Target NameSpace Prefix field and specify the target namespace uri in the Target Namespace URI field. You must specify both a prefix and a URI, if applicable, or leave both fields blank. If the Use Target Namespace from Schema checkbox is selected, the target namespace specified in the XML Schema for the XML document is used. Click the Finish button.
|
|
An XML document of the selected configuration gets created. The new xml document gets added to the project panel.
|
|
In XMLEspresso 6.0 a DTD document may be added. Select the DTD tab in the Catalogs. Select XML document type declaration entry and click on OK.
|
|
Specify document name and click on OK.
|
|
A DTD document gets added to the project.
|
|
To add ELEMENT, ATTLIST and ENTITY constructs to the DTD document, select Ctrl+Space in the DTD document. A list of DTD constructs gets displayed.
|
|
For example, add an ELEMENT.
|
|
The DTD Editor provides code assist. Select Ctrl+Space in the ELEMENT to add element name and sub-elements.
|
|
The Error Log displays the errors in the DTD document.
|
|