In the Design view, when you edit an XML file that has a set of
constraints or rules defined by a DTD or an XML schema, you can turn the constraints
on and off to provide flexibility in the way you edit, but still maintain
the validity of the document periodically.
When the constraints are turned on, and you are working in the
Design view, the XML editor prevents you from inserting elements, attributes,
or attribute values not permitted by the rules of the XML schema or DTD, and
from removing necessary or predefined sets of tags and values. In this mode,
an element's content must be valid to use the XML editor's guided editing
options.
You might want to turn the constraints off for an XML file
if you need more flexibility. For example, you want to try working with elements
or attributes not permitted by the associated DTD or XML schema, without actually
removing the association with the DTD or XML schema.
To turn the constraints
for an XML file off, click in the toolbar. After you
have turned the constraints off for a file, you can insert or delete any element
or attribute regardless of the DTD or XML schema rules. You can create new
elements or attributes that are not in the DTD or schema - these Design view
prompts will only appear when you have turned constraints off. The file might
not be valid, however, if you do this.
The following example shows
what you can do if you turn the constraints of a DTD off:
If you introduce errors into your files, you must
save and validate the file in order to see a list of the errors you have introduced.
They will be listed in the Problems view. After you fix the errors, you must
save and validate your file again to see if the file is now valid.
These
instructions were written for the Resource perspective, but they will also
work in many other perspectives.