| Editing XML Documents / Validating XML Documents | |
A Well-Formed XML document is a document that conforms to the XML syntax rules. A Namespace Well-Formed XML document is a document that is XML Well-Formed and is also namespace-wellformed and namespace-valid.
The XML Syntax rules for Well-Formed XML are:
The namespace-wellformed rules are:
The namespace-valid rules are:
To check if a document is Namespace Well-Formed XML, go to . You can also open the drop-down menu of the
validate button on the toolbar and
select
Check
Well-Formedness. If any error is found the result is returned to the message
panel. Each error is one record in the result list and is accompanied by an error message.
Clicking the record will open the document containing the error and highlight its approximate
location.
<root><tag></root>When Check Well-Formedness is performed the following error is raised:
The element type "tag" must be terminated by the matching end-tag "</tag>"
To resolve the error, click in the result list record which will locate and highlight the errors approximate position. Identify which start tag is missing an end tag and insert </tag>.
<x::y></x::y>When Check document form is performed the following error is raised:
Element or attribute do not match QName production: QName::=(NCName':')?NCName.
<x:y></x:y>When Check document form is performed the following error is raised:
The prefix "x" for element "x:y" is not bound.
Also the files contained in the current project and selected with the mouse in the Project view can be checked for
well-formedness with one action available on the popup menu of the Project view :
Check
Well-Formedness.