Altova XMLSpy 2024 Enterprise Edition

icAssignSchema

The Assign Schema command is enabled when an XML document is active. It assigns an XML Schema 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 XML Schema or XML schema package 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 an XML Schema assignment together with the required namespaces. The schema assignment will look something like this:

 

xmlns="http://www.xmlspy.com/schemas/icon/orgchart"

xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"

xsi:schemaLocation="http://www.xmlspy.com/schemas/icon/orgchart http://schema.xmlspy.com/schemas/icon/orgchart.xsd"

 

© 2018-2024 Altova GmbH