This root element will usually contain attributes that define namespaces or offer support for validation. The following example is displayed in 5 lines for clarity; in practice, however, the code will usually be written in one line.
- xs:schemaLocation="http://studieData.nl/schema/edudex/clientDiscount http://studieData.nl/schema/edudex/clientDiscount.xsd"
- Line 2 defines http://studieData.nl/schema/edudex/clientDiscount as the default namespace (xmlns) of this document. Alternatively, you can choose to define an explicit namespace alias, e.g. xmlns:ns1, but then you will have to repeat this alias in every EDU-DEX element or attribute name.
- Line 3 defines http://www.w3.org/2001/XMLSchema-instance, a value standardised by the W3C consortium, as a namespace with xs (or any value to your liking) as alias.
- Line 4 uses this alias to refer to the standard schemaLocation attribute. The value of this attribute contains 2 parts:
- Part 1: the namespace http://studieData.nl/schema/edudex/clientDiscount defined in line 2;
- Part 2: the location where a validator can find the xsd describing the structure of this namespace.
- Please remember that all attributes and their values described here are case sensitive!
The authoritative discussion of xml namespaces
can be found at the W3C.