Altova XMLSpy 2024 Enterprise Edition

icAssignDTD

The Assign DTD command is enabled when an XML file is active. It assigns a DTD to an XML document, thus allowing the document to be validated and enabling intelligent editing for the document. The command opens the Choose Schema or DTD dialog (screenshot below) via which you can select the DTD you want to assign.

XSFileNewAssignSchema

The following options are available:

 

Assign Schema/DTD File: Browse for the XML Schema or DTD file you want to assign. Note that you can make the assignment in the document a relative or absolute path.

Assign Packaged Schema: Some schemas are each actually a package of schema files rather than a single schema file. The Assign Packaged Schema option opens a dialog that lists the schema packages supported by Altova's Schema Manager. In this dialog, schemas listed in black have already been installed on your machine, those in blue have not been installed and can be installed by Schema Manager. When you select a schema package or one of its schema entry points and click OK, the following happens: The schema package will be installed if it has not already been installed. The selected schema package (previously installed or newly installed) will be assigned to the document and will be used from this point onwards for document validation.

Cancel: If a new file is being created, then it is created with no XML Schema or DTD assignment. If the schema assignment is for an already existing document, then the dialog is exited.

 

When you are done, your XML document will contain a DOCTYPE declaration that references the assigned DTD. The DOCTYPE declaration will look something like this:

 

<!DOCTYPE main SYSTEM "http://link.xmlspy.com/spyweb.dtd">

 

Note:A DTD can be assigned to a new XML file at the time the file is created.

 

© 2018-2024 Altova GmbH