A XML document is correct, if it is:
The standard XML-based interchange syntax of Topic Maps is called XML Topic Maps (XTM).
An XML document is text, which is a sequence of characters. The specification requires support for Unicode encoding UTF-8 and UTF-16 (UTF-32 is not mandatory). The use of other non-Unicode based encoding, such as ISO-8859, is admitted and is indeed widely used and supported.
A well-formed document must conform to the following rules, among others:
Element names are case-sensitive. For example, the following is a well-formed matching pair
<Step> ... </Step>
whereas this is not
<Step> ... </step>
The careful choice of names for XML elements will convey the meaning of the data in the markup. This increases human readability while retaining the rigor needed for software parsing.
Choosing meaningful names implies the semantics of elements and attributes to a human reader without reference to external documentation. However, this can lead to verbosity, which complicates authoring and increases file size.
An XML document that complies with a particular schema, in addition to being well-formed, is said to be valid.
An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic constraints imposed by XML itself. A number of standard and proprietary XML schema languages have emerged for the purpose of formally expressing such schema’s, and some of these languages are XML-based, themselves.
Before the advent of generalised data description languages such as SGML and XML, software designers had to define special file formats or small languages to share data between programs. This required writing detailed specifications and special-purpose parsers and writers.
XML‘s regular structure and strict parsing rules allow software designers to leave parsing to standard tools, and since XML provides a general, data model-oriented framework for the development of application-specific languages, software designers need only concentrate on the development of rules for their data, at relatively high levels of abstraction.
XTM conform Topic Maps have to comply with the XTM 1.0 Document Type Declaration to be valid.
Take a look at our XTM Tutorial to get an introduction to XTM.
—-
This site is based on the article „XML“ from the free encyclopedia.Wikipedia** under the terms of the GNU Free Documentation License. In Wikipedia a list of versions and the authors is available.