(one of the InLOC Bindings)
- 1 Introduction
- 2 InLOC XML schema
- 3 InLOC Examples
- 4 XML declaration, root element and namespace
- 5 LOC structures and LOC definitions
- 5.1 The LOC abstract type
- 5.2 LOC structure
- 5.3 LOC structure example XML
- 5.4 LOC definition
- 5.5 Example XML for LOC structure with definitions
- 6 LOC association
- 6.1 The sub-elements subject, scheme and object
- 6.2 The number sub-element
- 6.3 XSD for LOC association and sub-elements
- 6.4 LOC association examples
- 7 Using multilingual content
- 8 Using a CDATA section for complex or HTML structured description
- 9 XML extension and application profiling
- 10 Further reading
For an introduction to XML and XML schema, there are several well-known sources, including:
The outputs of the InLOC project include:
- an XML schema to enable validation and conformance of XML data;
- samples of XML for each of the main InLOC classes;
- more complete XML examples based on existing frameworks.
In this document, XML element names are given in bold, and XML attribute names are given in italic.
Figure 1: the original InLOC information model interpreted for XML
The diagram of the XML Schema as output by the Oxygen XML editor ("design view") is given in the XML Schema design view page. This diagram includes the cardinality of each element.
The URI of the schema is: http://purl.org/net/inloc/inloc_schema.xsd.
An appropriate XSI schema location line is:
These examples have been validated against the current InLOC XML schema. They are all tests, and have no authority of any kind.
- CEFR in InLOC XML
- e-CF in InLOC XML
- The EQF in four languages
- A test example based on material from the eCOTOOL project
- Mozilla's Web Literacy Standard (draft)
The XML binding of InLOC is based on XML v1.0. The root element for InLOC XML is a LOCstructure, corresponding exactly to the LOCstructure in the Information Model.
The namespace "http://purl.org/net/inloc/" uses OCLC's PURL redirection service, so that when the namespace is concatenated with an element or attribute name, the resulting URI can be redirected to the appropriate place in the InLOC documentation. (The Dublin Core Metadata Initiative has used this approach for many years.)
Here is an example of the XML declaration and root element tag using the InLOC namespace and referring to the InLOC XML schema:
The attributes include:
- xml:lang – the main language used after to describe the InLOC document ("en" means english);
- id – a URI for the structure itself, which is based here on the e-CF example.
The LOCstructure and LOCdefinition elements have common direct properties as sub-elements. The allowed sub-elements are defined in the LOCstructure information model. The snippet below show the XML schema representation of that direct property information. Note that the elements must appear in the order given for them to validate against this schema.
The Information Model's LOC class corresponds to this type in the XSD.
The main root element is a LOCstructure and, as well as the direct properties listed above, allows the following child elements:
- other LOCstructures, if needed for a complex framework;
- LOCdefinitions detailing each separate LOC concept;
- LOCassociations, which serve for both
- explicitly defining the relations between LOCstructures and LOCdefinitions, and
- relating both of them to their responsible agents, credit schemes, educational level schemes, topics and other categories.
The relevant parts of the XML would be as follows, with the Framework as a whole represented by the containing LOCstructure, and with sample LOCdefinitions, which may be placed inside or outside the LOCstructure.
Directly following the Information Model, the LOCassociation element has three mandatory sub-elements and one optional sub-element:
- number (optional)
The id attribute of LOCassociation is not expected to be much used, but is present in case a particular LOCassociation needs to be identified.
The type of association is given by a type attribute, which has as value one of:
The id of the subject, scheme, and object elements is given by an attribute holding a URI ("anyURI").
The values for the scheme id are specified by InLOC in two cases:
- for LOCassociation type "LOCrel";
- for LOCassociation type "by".
Though these are specified by InLOC, they are not checked by the XSD. Any LOCassociation of these types with a scheme id value that is not listed here may be ignored or discarded by a receiving system, or may be interpreted as one of these, if information is available indicating that it is a specialisation of one of these.
Within LOCassociations of type "LOCrel", the scheme id value should be one of:
Within LOCassociations of type "by", the scheme id value should be one of:
Within the subject, scheme and object elements there are any number of label sub-elements, each with an optional xml:lang attribute.
This contains simply a text node, specified to hold a decimal number.
There are no attributes of the number element.
In order to support multilingual content it is possible to use the optional xml:lang attribute in any element with textual content. These text elements may be repeated once for each different language, and once without an explicit language.
While CDATA may be use in other text fields, it is recommended primarily within the furtherInformation element, for example as follows.
Beyond the furtherInformation element, InLOC allows CDATA sections in these elements, which can be text, links, or a mixture:
A CDATA section cannot contain the string "]]>". Nested CDATA sections are not allowed.
The "]]>" that marks the end of the CDATA section cannot contain spaces or line breaks.
Other information on CDATA can be found at:
The following text elements may be used in many different kinds of display contexts, and are specified using the type xs:token.
Though xs:token does not specifically exclude CDATA content, CDATA should not be used within these for InLOC.
If CDATA sections exist within these elements, receiving systems may strip and discard any contained markup.
There are several ways to extend or build application profiles of the InLOC model.
- The predefined vocabularies listed in the XML Schema, for the LOCassociation type attribute or the scheme id attribute, can be changed. However, it is not recommended to extend these vocabularies, because examples that are valid under the changed schema may not be under the original one.
- New elements may be added. It is not recommended to add new elements modifying the XML schema, as this breaks conformance. Instead, it is recommended to use the furtherInformation element with a structured CDATA section.
- The furtherInformation element can be used as an extension point: as described above, it is possible to use this element with a CDATA section that contains new structured elements/metadata and even to add any attribute to it.
XML in general:
PURL redirection service