Objects and References
ISO XML consists of tags, elements (with or without content), and xml attributes. An xml attribute is a name/value pair that exists within a start-tag or empty-element tag. Attributes provide additional information about an element which is not part of the data. Attribute values must contain either single or double quotes. This example shows a step element with one attribute named number with a value of “3”:
<step number="3">Connect A to B.</step>
Note that the number attribute is not part of the content of this element, i.e. Connect A to B.
Many of the XML attributes used in the ISO Standards fall into two groups: identifiers and references:
- Identifiers: id and uuid
- References: uuidref and xlink:href
These standard attributes can only occur in specific places in the XML:
- Objects start with two upper case letters and an underscore (e.g. MD_, CI_, ...) and have identifiers (id and uuid)
- Roles start with lower case letters and have references (uuidref and xlink:href)
The Figure illustrates this idea with two people: Jane and John Doe. They are items in the real-world, i.e. objects. In ISO metadata they have a type (CI_Individual) and they have identifiers (JaneDoe and JohnDoe). They also have roles with respect to one another. Jane has a friend (the role) whose identifier is JohnDoe. This is indicated with the reference (xlink:href) to JohnDoe associated with the role of friend. John also has a friend (the role) named JaneDoe, as indicated by the reference to Jane associated with the friend role.
Understanding that roles start with lower case letters and are fulfilled by objects that start with uppercase letters and have id's is one of the simple secrets of ISO XML. Keep it in mind!