What is SKOS and How to Serialize in RDF/XML

This article provides an overview of the Simple Knowledge Organization System (SKOS), a standard model for expressing classification systems, taxonomies, and thesauri on the Semantic Web. It explains the foundational elements of SKOS, including concepts, schemes, and semantic relations, followed by a direct demonstration of how to represent and serialize this data using the RDF/XML format.

Understanding SKOS

The Simple Knowledge Organization System (SKOS) is a W3C standard based on the Resource Description Framework (RDF). It bridges the gap between informal, human-readable organization structures and formal, logically rigorous ontologies (such as OWL). SKOS is widely used to publish controlled vocabularies, subject heading lists, and thesauri in a machine-readable format.

The primary building blocks of SKOS include:

Serializing SKOS in RDF/XML

RDF/XML is an XML-based syntax used to encode RDF graphs. When serializing SKOS to RDF/XML, you declare the RDF and SKOS XML namespaces, define a skos:ConceptScheme, and define each skos:Concept with their respective labels and semantic links.

Example RDF/XML Serialization

The following example defines a taxonomy about animals, demonstrating a concept scheme, preferred and alternative labels, and hierarchical relationships.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF 
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#">

  <!-- Concept Scheme Definition -->
  <skos:ConceptScheme rdf:about="http://example.org/vocab/animals">
    <skos:prefLabel xml:lang="en">Animal Taxonomy</skos:prefLabel>
    <skos:definition xml:lang="en">A basic vocabulary classifying animal species.</skos:definition>
    <skos:hasTopConcept rdf:resource="http://example.org/vocab/animals/mammals"/>
  </skos:ConceptScheme>

  <!-- Top Concept: Mammals -->
  <skos:Concept rdf:about="http://example.org/vocab/animals/mammals">
    <skos:inScheme rdf:resource="http://example.org/vocab/animals"/>
    <skos:topConceptOf rdf:resource="http://example.org/vocab/animals"/>
    <skos:prefLabel xml:lang="en">Mammal</skos:prefLabel>
    <skos:altLabel xml:lang="en">Mammalia</skos:altLabel>
    <skos:narrower rdf:resource="http://example.org/vocab/animals/canines"/>
  </skos:Concept>

  <!-- Narrower Concept: Canines -->
  <skos:Concept rdf:about="http://example.org/vocab/animals/canines">
    <skos:inScheme rdf:resource="http://example.org/vocab/animals"/>
    <skos:prefLabel xml:lang="en">Canine</skos:prefLabel>
    <skos:altLabel xml:lang="en">Dog family</skos:altLabel>
    <skos:broader rdf:resource="http://example.org/vocab/animals/mammals"/>
    <skos:definition xml:lang="en">A carnivorous mammal of the family Canidae.</skos:definition>
  </skos:Concept>

</rdf:RDF>

Breakdown of the Code Structure