(one of the InLOC Bindings)

The InLOC XML Binding


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.

InLOC XML schema

The XML schema corresponds to the current UML diagram within the Information Model.

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:

xsi:schemaLocation="http://purl.org/net/inloc/ http://purl.org/net/inloc/inloc_schema.xsd"

InLOC Examples

These examples have been validated against the current InLOC XML schema. They are all tests, and have no authority of any kind.

XML declaration, root element and namespace

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:

LOCstructure main element declaration
<?xml version="1.0" encoding="UTF-8"?>
<LOCstructure xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://purl.org/net/inloc/ http://purl.org/net/inloc/inloc_schema.xsd"
    id="http://example.eu/ids/ecf" xml:lang="en">

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.

LOC structures and LOC definitions

The LOC abstract type

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.

Representation of common element for LOCstructure and LOCdefinition in the XSD schema
<xs:complexType name="LOCtypeLOC" abstract="true">
    <xs:element name="extraID" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="title" type="inloc:LOCtypeMultilingualToken" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="abbr" type="inloc:LOCtypeMultilingualToken" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="description" type="inloc:LOCtypeMultilingualString" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="furtherInformation" type="inloc:LOCtypeMultilingualStringAnyAttribute" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="rights" type="inloc:LOCtypeMultilingualString" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="created" type="xs:dateTime" minOccurs="0"/>
    <xs:element name="modified" type="xs:dateTime" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="issued" type="xs:dateTime" minOccurs="0"/>
    <xs:element name="validityStart" type="xs:dateTime" minOccurs="0"/>
    <xs:element name="validityEnd" type="xs:dateTime" minOccurs="0"/>
    <xs:element name="version" type="xs:token" minOccurs="0"/>
  <xs:attribute name="id"  type="xs:anyURI" use="required"/>
  <xs:attribute ref="xml:lang"/>

LOC structure

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.
Representation of LOCstructure in the XSD schema
<xs:complexType name="LOCtypeLOCstructure">
      <xs:extension base="inloc:LOCtypeLOC">
            <xs:element name="combinationRules" type="inloc:LOCtypeMultilingualString" minOccurs="0" maxOccurs="unbounded"/>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="LOCstructure" type="inloc:LOCtypeLOCstructure"/>
                <xs:element name="LOCdefinition" type="inloc:LOCtypeLOCdefinition"/>
                <xs:element name="LOCassociation" type="inloc:LOCtypeLOCassociation"/>

<!-- root ELEMENT -->
<xs:element name="LOCstructure" type="inloc:LOCtypeLOCstructure"></xs:element>

LOC structure example XML

XML Sample of a basic LOCstructure content with only some optional child elements
<LOCstructure id="http://example.eu/ids/ecf">
    <title>e-Competence Framework</title>

LOC definition

Representation of LOCdefinition in the XSD schema
<xs:complexType name="LOCtypeLOCdefinition">
        <xs:extension base="inloc:LOCtypeLOC">
            <xs:element name="primaryStructure" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
Simple LOCdefinition content
<LOCdefinition id="http://example.eu/ids/A.2">
    <title>Service Level Management</title>
Defines, validates and makes applicable service level agreements
(SLA) and underpinning contracts for services offered.
Negotiates service performance levels taking into account
the needs and capacity of customers and business.

Example XML for LOC structure with definitions

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.

Example LOCstructure with several LOCdefinitions
<?xml version="1.0" encoding="UTF-8"?>
    xsi:schemaLocation="http://purl.org/net/inloc/ http://purl.org/net/inloc/inloc_schema.xsd"
    <title>Vitae Researcher Development Framework</title>
    <abbr>Vitae RDF</abbr>
    <version>2 April 2011</version>

<LOCdefinition id="http://www.vitae.ac.uk/researchers/uri/B">
    <title>Personal effectiveness</title>
This domain contains the personal qualities, career and self-management skills
required to take ownership for and control of professional development.

<LOCdefinition id="http://www.vitae.ac.uk/researchers/uri/B2">

<LOCdefinition id="http://www.vitae.ac.uk/researchers/uri/B2-2">
    <title>Commitment to research</title>

<LOCdefinition id="http://www.vitae.ac.uk/researchers/uri/B2-2_Ph2">
Evaluates and manages potential distractions.
Dedicated: has purposeful and determined focus on developing own research and research credentials.


LOC association

Directly following the Information Model, the LOCassociation element has three mandatory sub-elements and one optional sub-element:

  1. subject
  2. scheme
  3. object
  4. number (optional)

The id and type from the Information Model are represented as corresponding attributes.

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 sub-elements subject, scheme and object

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.

The number sub-element

This contains simply a text node, specified to hold a decimal number.

There are no attributes of the number element.

XSD for LOC association and sub-elements

Representation of LOCassociation in the XSD schema
<xs:simpleType name="LOCtypeAssociationType">
    <xs:restriction base="xs:anyURI">
        <xs:enumeration value="http://purl.org/net/inloc/LOCrel"/>
        <xs:enumeration value="http://purl.org/net/inloc/by"/>
        <xs:enumeration value="http://purl.org/net/inloc/category"/>
        <xs:enumeration value="http://purl.org/net/inloc/credit"/>
        <xs:enumeration value="http://purl.org/net/inloc/level"/>
        <xs:enumeration value="http://purl.org/net/inloc/topic"/>

<xs:complexType name="LOCtypeSubject">
        <xs:element name="label" type="inloc:LOCtypeMultilingualToken" maxOccurs="unbounded" minOccurs="0"/>
    <xs:attribute name="id"  type="xs:anyURI" use="required"/>

<xs:complexType name="LOCtypeSchemeObject">
        <xs:element name="label" type="inloc:LOCtypeMultilingualToken" maxOccurs="unbounded" minOccurs="0"/>
    <xs:attribute name="id"  type="xs:anyURI"/>

<xs:complexType name="LOCtypeLOCassociation">
        <xs:element name="subject" type="inloc:LOCtypeSubject" maxOccurs="1" minOccurs="1"/>
        <xs:element name="scheme" type="inloc:LOCtypeSchemeObject" maxOccurs="1" minOccurs="1"/>
        <xs:element name="object" type="inloc:LOCtypeSchemeObject" maxOccurs="1" minOccurs="1"/>
        <xs:element name="number" type="xs:decimal" maxOccurs="1" minOccurs="0"/>
    <xs:attribute name="id"  type="xs:anyURI"/>
    <xs:attribute name="type"  type="inloc:LOCtypeAssociationType" use="required"/>

LOC association examples

LOCassociation "by" example
<LOCassociation id="http://example.eu/4t8dh9fa8bp34" type="http://purl.org/net/inloc/by">
    <subject id="http://example.eu/ids/ecf"></subject>
    <scheme id="http://purl.org/net/inloc/publisher">
    <object id="">
LOCassociation hasLOCpart example
<LOCassociation type="http://purl.org/net/inloc/LOCrel">
    <subject id="http://www.vitae.ac.uk/researchers/uri/vitaerdf"></subject>
    <scheme id="http://purl.org/net/inloc/hasLOCpart"></scheme>
    <object id="http://www.vitae.ac.uk/researchers/uri/B"></object>
LOCassociation hasDefinedLevel example
<LOCassociation type="http://purl.org/net/inloc/LOCrel">
    <subject id="http://www.vitae.ac.uk/researchers/uri/B2-2"></subject>
    <scheme id="http://purl.org/net/inloc/hasDefinedLevel"></scheme>
    <object id="http://www.vitae.ac.uk/researchers/uri/B2-2_Ph2"></object>
LOCassociation category example
<LOCassociation type="http://purl.org/net/inloc/category">
    <subject id="http://www.vitae.ac.uk/researchers/uri/B"></subject>
    <scheme id="http://www.simongrant.org/InLOC/Vitae_categories#">
        <label>Vitae object category</label>
    <object id="http://www.simongrant.org/InLOC/Vitae_categories#domain">
LOCassociation credit example
<LOCassociation type="http://purl.org/net/inloc/credit">
    <subject id="http://www.vitae.ac.uk/researchers/uri/B2-2_Ph2"></subject>
    <scheme id="http://purl.org/net/cm/terms/ECTS">
        <label xml:lang="en">European Credit Transfer and Accumulation System</label>
    <object id="http://purl.org/net/cm/terms/ECTS#3">
        <label xml:lang="en">Third cycle</label>
LOCassociation level example
<LOCassociation type="http://purl.org/net/inloc/level">
    <subject id="http://www.vitae.ac.uk/researchers/uri/B2-2_Ph2"></subject>
    <scheme id="">
    <object id="eqf#5">
        <label>EQF Competence Level 5</label>

Using multilingual content

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.

Example of multilingual label
<scheme id="http://purl.org/net/inloc/creator">
    <label xml:lang="en">Author</label>
    <label xml:lang="fr">Auteur</label>
Example of LOCdefinition with multilingual title and description
<LOCdefinition id="http://www.purl.org/net/inloc/cigref.1">
    <description xml:lang="fr">
Cette famille regroupe tous les métiers qui touchent de manière globale à la mise en cohérence
organisationnelle et fonctionnelle du ou des SI. La plupart de ces métiers travaille avec
le business dans le respect des orientations stratégiques et ambitions de l'entreprise
    <description xml:lang="en">
This family groups together all the roles which are generally concerned with ensuring
the organisational and functional consistency of the Information System(s). Most of these roles
work with the business in compliance with the strategic orientations and ambitions of the company.

Using a CDATA section for complex or HTML structured description

While CDATA may be use in other text fields, it is recommended primarily within the furtherInformation element, for example as follows.

Example of CDATA section
Example of piece of HTML data:<br/>
<a href="http://www.cigref.fr">Link to the Cigref webpage</a>
Example of CDATA section
<li>Organization plan of managed project(s)<li/>
<li>Management Reporting on the alignment of the projects<li/>

Beyond the furtherInformation element, InLOC allows CDATA sections in these elements, which can be text, links, or a mixture:

  • description
  • rights
  • combinationRules

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:

Restrictions on the use of CDATA

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.

  • title
  • abbr
  • version
  • label

If CDATA sections exist within these elements, receiving systems may strip and discard any contained markup.

XML extension and application profiling

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.
Extension example using CDATA section and two new attributes in furtherInformation
<LOCdefinition id="http://example.eu/ids/A.2">
    <title>Service Level Management</title>
Defines, validates and makes applicable service level agreements (SLA) and underpinning contracts for services offered.
Negotiates service performance levels taking into account the needs and capacity of customers and business
    <furtherInformation myAPattr1="45" myAPattr2="Could be a string as well"><![CDATA[
you could add any kind of XML elements and types, complex or simple

Further reading

XML in general:


PURL redirection service