As a schema becomes bigger and more complex, it will have more type definitions, and references to those types. So what happens after you have defined a type, created ten references to that type, and you want to change the name of the type? The XML schema editor has a built-in refactoring mechanism that will propagate the changes automatically, meaning you do not have to do any manual updating. The following steps illustrate this feature.
In your University.xsd file, you have defined a simple type called Faculties. There is a reference to this type in the Student complex type. You have decided to change the name of the simple type to Faculty:
A namespace provides a way to identify where an element or attribute comes from.
In the University.xsd schema, the target namespace is http://www.example.org/University. This is indicated by the targetNamespace attribute in the schema element. This means that all the types that are defined in this schema belong to the target namespace http://www.example.org/University.
xmlns:tns="http://www.example.org/University"To refer to a type defined in this schema, you must use this defined prefix. Look at the Source view and note how the major element and the student element refers to the type as follows:
<element name="major" type="tns:Faculty"/> <element name="student" type="tns:Student"/>
If you want to change the namespace prefix or the target namespace for your schema, you can use the Design view. Follow these steps:
Another useful feature of the XML schema editor is the incremental validation feature. After you save your XML schema file, you can right-click it in the Navigator view and click Validate. Any validation errors are reported in the Problems view with a red marker for the corresponding line in the Source view.
XML Schema Editor provides the tools to easily make changes which affect multiple dependencies, in a single step. In addition, the editor provides simple methods to specify namespace details, and verify file syntax.