Cogitech IncMiscellaneous | About us | Training | Tabular Topic Maps | Cogitative Topic Map Websites | Semantic Web Glasses | XWATL
Cogitative Technologies>Semantic Web Glasses

Secure SSL Certificates.

XML Topic Maps through RDF Glasses

The information represented in a topic map, expressed in one of the XML interchange syntaxes for topic maps, can, at some level of detail, be translated into information that is expressed in one of the XML interchange syntaxes for RDF information. The translated information can then be used in the context of RDF applications that would otherwise not be able to use it.

by Nikita Ogievetsky , Cogitech, Inc.
©Cogitech, Inc.

RDF Semantic Web Views

Semantic Web through RDF Glasses

Semantic Web through XTM Glasses

RDDL for XTM2RDF glasses frame

  xlink:title="Sea Creatures Topic Map In RDF"

XTM-enabling RDF applications

  • RDF Graphs
  • RDF Queries
  • RDF and XTM integration


Topic Map Theoretical Model

"Just as the practical field of engineering has theoretical physics as its underlying base, the design of systems for organizing information rests on an intellectual foundation." --Elaine Svenonius
Translation from one knowledge representation to another assumes mapping of their corresponding data models. It involves certain assumptions and axioms. One can envision a new line of business in the near future: companies will register semantic web translation services (between various knowledge representation frameworks) with UDDI repositories and compete on the basis of better conveying the original semantic (whatever that means).

Namespaces and RDF Schemas

RDF Topic Maps (RTM) Schema
  • RDF classes and properties corresponding to core XML Topic Maps constructs.
  • TMPM4 PSI declarations.
Dogovorennost: XTM2RDF translator always uses rtm namespace namespace prefix.

Dynamic Namespaces

During transformation association templates (classes) are translated into RDF Classes and Topic Map association member roles are translated into RDF Properties.
Accordingly, namespace declarations are created for each external document containing definitions of
  • Association templates
  • Association membership roles

RDF Classes

rdfs:Class is created for each referenced association template defined inside or outside of the original XTM document.
  • Class of all associations templated by a template topic.
<rdfs:Class about="">
	<rdfs:subClassOf resource=""/>
<rdfs:Class about="#family">
	<rdfs:subClassOf resource=""/>

RDF Properties

rdf:Property is created for each distinct XTM association member role.
  • a role played in a class of associations (an association template);
<rdf:Property about="">
	<rdfs:domain rdf:resource=""/>
	<rdfs:range rdf:resource=""/>
in the case of associations that do not have templates
  • a unique role played in one or more associations. [TMPM4]
<rdf:Property about="">
	<rdfs:domain rdf:resource=""/>
	<rdfs:range rdf:resource=""/>

RTM classes and properties.

Association templates and association member roles defined in TMPM4 are echoed in the RTM schema and thus will not demand:
  • creation of an additional namespace declaration
  • dynamic creation of corresponding properties and classes.

XTM <topic>

In XTM <topic> subject can be
  • Constituted by a resource;
  • Indicated by one or more resources.

<topic> processing

Subject is constituted by a resource?
  • rdf:about attribute pointing to the constituting resource.
<rtm:topic rdf:about="">
(Note: there is no need to generate this statement if there are no subject indicators !).
  • rdf:ID attribute that may or may not be equal to the @id attribute of the original <topic>
<rtm:topic rdf:ID="nikita"> 

<rtm:topic>: binding hub

Groups several resources (binding points) together and demand that they indicate one and the same subject.
<rdfs:Class rdf:ID="topic">
	<rdfs:subclassOf resource=""/>
	<rdfs:subclassOf resource="#t-node"/>
	<indicatedBy rdf:resource=""/>
	<indicatedBy rdf:resource=""/>
	<indicatedBy rdf:resource=""/>
	<rdf:comment>The fundamental building block of a topic map.</rdf:comment>
  • This a departure from TMPM4 where no special semantics is reserved to represent the fact that a given node in the graph was explicitly demanded by a <topic> element.
<rdfs:Class rdf:ID="t-node">
	<indicatedBy rdf:resource=""/>
	<rdf:comment>Subject identity point.</rdf:comment>


<rtm:topic> can have one or more <rtm:indicatedBy> properties
<rdf:Property rdf:ID="indicatedBy">
	<indicatedBy rdf:resource=""/>
	<indicatedBy rdf:resource=""/>
	<rdfs:domain rdf:resource="#topic"/>
	<rdfs:domain rdf:resource="#scope"/>
	<rdfs:domain rdf:resource="#member"/>
	<rdfs:range rdf:resource=""/>
	<rdf:comment>Subject Indicating Resource</rdf:comment>


<rtm:topic rdf:ID="nikita"> 
	<rtm:indicatedBy rdf:resource="urn:padi-diver-no:9907571524"/> 
	<rtm:indicatedBy rdf:resource=""/>

<resourceRef> processing

Outside of XTM <subjectIdentity> element
  • <resourceRef> elements are translated into <rtm:constitutedBy> property.
<rdf:Property rdf:ID="constitutedBy">
	<indicatedBy rdf:resource=""/>
	<indicatedBy rdf:resource=""/>
	<rdfs:domain rdf:resource="#member"/>
	<rdfs:range rdf:resource=""/>
	<rdf:comment>Subject Constituting Resource</rdf:comment>

<topicRef> and <subjectIndicatorRef> processing

Always translated into <rtm:indicatedBy> property.
Subject-based merging applies:
  • rtm:indicatedBy(rtm:constitutedBy(A))=rtm:constitutedBy(A)
  • rtm:indicatedBy(rtm:indicatedBy(A))=rtm:indicatedBy(A)

<instanceOf> processing

In most cases <instanceOf> element expands into class-instance association:
  • follows rules of <association> processing.
However, <instanceOf> element addressing association template (association-template arc in TMPM4 ):
  • is translated into rdf:type property .

Association Classes (templates) in RTM Schema.

rtm:basename - topic-baseName association class
  • indicated by template.
rtm:occurrence - topic-occurrence association class
  • indicated by template.
rtm:variantname - basename-variantname association class
  • indicated by template.
rtm:class-instance - class-instance association class
  • indicated by template.
rtm:class-subclass - class-instance association class
  • indicated by template.
rtm:templaterpc - template - role - rpc (role player constraints) association class
  • indicated by template.

<baseName> processing

Expanded into topic-basename association and translated into a statement of type rtm:basename.
Class rtm:basename is a class of all associations templated by
  • rtm:role-topic - whose object is rtm:member indicated by the topic;
  • rtm:role-name whose object is rtm:member containing a literal string uniquely identifying the topic;
  • rtm:validIn whose object is the context within which this statement's assertions are valid.
    • context within which a literal specified by rtm:role-name property uniquely identifies the topic addressed by rtm:role-topic property.

<variant> processing

Expanded into baseName-variant association and translated into a statement of type rtm:variantname.
Class rtm:variantname is a class of all associations templated by
  • rtm:role-basename - whose object is rtm:member indicated by the rtm:basename statement for which an alternate form is specified.
  • rtm:role-variantname - whose object is rtm:member constituted by a resource or a literal representing the alternate form.
  • rtm:validIn whose object is the device context within which the resource identified by rtm:role-variantname property is an appropriate alternate form for topic's base name.
Note: this is another departure from TMPM4 where rtm:role-name and rtm:role-basename are represented by one PSI.

Descendant <variant> elements

Expanded into basename-variantname associations between the <variant> element itself and the ancestor topic-basename association with device context containing union of <parameter> elements off all intermediate <variant> elements.
Object of rtm:validIn property is rtm:scope containing union of all intermediate <parameter> elements.

<occurrence> processing

Expanded into topic-occurrence association and converted into a statement of type rtm:occurrence.
Class rtm:occurrence is a class of all associations templated by
  • rtm:role-topic - whose object is rtm:member indicated by the topic;
  • rtm:role-occurrence whose object is rtm:member constituted by a resource or a literal;
  • rtm:validIn whose object is the context within which topic-occurrence statement's assertions are valid.

<occurrence> <instanceOf> processing

Based on the set of the following inferences:
  • 1) Topic addressed by topic occurrence <instanceOf> element is a subclass of rtm:occurrence (topic occurrence).
  • 2)rtm:occurrence is a subclass of rtm:association.
  • Thus topics addressed by occurrence <instanceOf> elements are association templates.
  • Thus occurrence's <instanceOf> child is transformed into rdf:type property.

Derived RDF Schema constracts

At translation time, an rdfs:Class declaration is created for each unique occurrence type (association template).
Inferred occurrence association templates has exactly two roles:
  • rtm:role-topic
  • rtm:role-association

RDF representation for an occurrence. Input.

<topic id="default"/>

		<topicRef xlink:href="#landsc-img"/>
		<topicRef xlink:href="#nikita"/>
	<resourceRef xlink:href="ocean1.jpg"/>

RDF representation for an occurrence. Translation.

<rdfs:Class rdf:about="#landsc-img">
  <rdfs:subClassOf resource="" />
<this:landsc-img rdf:ID="IDAPAE0">
    <rtm:indicatedBy rdf:resource="#nikita" />
    <rtm:indicatedBy rdf:resource="#default" />
    <rtm:constitutedBy rdf:resource="ocean1.jpg" />

Graph generated by W3C RDF Validation Service

Simplified graph

(rdf containers types removed)

<association> processing

Topic Map association is translated into a statement of type rtm:association or one of its subclasses (see association <instanceOf> processing).
rtm:association is a class of all association templates and corresponds to a-node in TMPM4 model.
  • One or more association member-properties whose object is rtm:member container indicated or constituted by topics praying {namespace}:{role} role in association.
    • {namespace} refers to the topic map document where association membership {role} is defined.
  • rtm:validIn whose object is the context within which this rtm:association statement's assertions are valid.

<association> <instanceOf> processing

Topic map <association> element whose <instanceOf> child points to some association template is translated into...
  • a statement of that association template class
    • Third RDF basic abbreviated form allows to use this Class directly as an element name.
Otherwise <association> element is translated into...
  • RDF statement of type rtm:association and <instanceOf> element is converted into a class-instance association between newly created rtm:association resource and its class.

association <member> processing

translated into rtm:member containers that hold t-node ends of topic-association arc.
rtm:member serves as proxy in the association membership role assignment:
  • Subject in membership container triple.
  • Object in association role triple.
rtm:member can hold one or more subjects indicated by on of the following refference types:
  • a resource;
  • a subject indicated by a resource;
  • a literal.
  • (...other choices?)

Is rtm:member necessary?

rtm:member would not be necessary if RDF were quadruple based rather than triple:
  • Predicate
  • Subject
  • Object
  • Reference type

Scopes and s-nodes

XTM <scope> element "specifies the extent of the validity of a topic characteristic assignment". [XTM]
s-node "uniquely represents a scope, i.e., no other s-node can have the same set of component topics" [TMPM4]
association scope arc connects a-node and an s-node.

<scope> processing

rtm:scope statement is generated for each unique <scope> in the source document.
rtm:association and its subclasses have rtm:validIn property whose object is some rtm:scope statement which contains subjects indicating validity context.
rtm:scope is a subclass of rdf:Bag.

XTM TripleSet

ObjectPredicateSubject rtm:topic @rdf:about resource @rdf:ID rtm:indicatedByrdf:resource rtm:scopertm:indicatedByrdf:resource rtm:association {xmlns}:{template} {xmlns}:{memberRole}rtm:member rtm:indicatedBy rtm:constitutedBy rtm:associationrtm:validInrtm:scope rtm:baseNamertm:role-topicrtm:member rtm:indicatedBy rtm:constitutedBy rtm:baseNamertm:role-namertm:member rtm:name rtm:baseNamertm:validInrtm:scope rtm:variantNamertm:role-baseNamertm:baseName rtm:variantNamertm:role-variantrtm:member rtm:constitutedBy rtm:name rtm:variantNamertm:validInrtm:scope rtm:ocurrencertm:role-topicrtm:member rtm:indicatedBy rtm:constitutedBy rtm:occurrencertm:role-occurrencertm:member rtm:constitutedBy rtm:name rtm:occurrencertm:validInrtm:scope

RDF-XTM-RDF roundtrip

DC Fragment from PRISM
<rdf:Description rdf:about="ZARA.xml">
	<dc:creator>Jane M. Folpe </dc:creator>


Stylesheet shown at KT2001 transforms above DC fragment to the following XTM representation:
		<topicRef xlink:href="#authorship"/>
			<topicRef xlink:href="#resource"/>
		<topicRef xlink:href="#N11"/>
			<topicRef xlink:href="#dc-creator"/>
		<topicRef xlink:href="#JaneMFolpe"/>
<topic id="authorship"/>
<topic id="resource"/>
<topic id="dc-creator">
		<subjectIndicatorRef xlink:href=""/>
<topic id="JaneMFolpe"/>
<topic id="N11">
		<resourceRef xlink:href="ZARA.xml"/>


Going back to XTM:
<rdf:Property rdf:about="#resource">
	<rdfs:domain rdf:resource=""/>
	<rdfs:range rdf:resource=""/>
<rdf:Property rdf:about="#dc-creator">
	<rdfs:domain rdf:resource=""/>
	<rdfs:range rdf:resource=""/>
<rtm:association rdf:ID="IDAGAQKC">
			<rtm:constitutedBy resource="ZARA.xml"/>
			<rtm:indicatedBy rdf:resource="#JaneMFolpe"/>
<rtm:classInstance rdf:ID="IDAHAQKC">
			<rtm:indicatedBy rdf:resource="#authorship"/>
			<rtm:indicatedBy rdf:resource="#IDAGAQKC"/>
<rtm:topic rdf:ID="authorship"/>
<rtm:topic rdf:ID="resource"/>
<rtm:topic rdf:ID="dc-creator">
	<rtm:indicatedBy rdf:resource=""/>
<rtm:topic rdf:ID="JaneMFolpe"/>
<rtm:topic rdf:about="ZARA.xml"/>

RDFDB Topic Maps queries


  • For more on thiis see [MIT]

Find all topics that have names in a certain scope.

SELECT ?t, ?name
 FROM  http://localhost/xtm2rdf/rdf8.xml
   (rtm::role-topic ?a ?z) (rtm::indicatedBy ?z ?t) 
   (rtm::role-name ?a ?z1)(rtm::name ?z1 ?name) 
   (rtm::validIn ?a ?s)(rtm::indicatedBy ?s this::taxon) 
   rtm FOR
   this FOR  http://localhost/xtm2rdf/rdf8.xml#

Find a topic with a specific name in a certain scope.

SELECT ?t, ?name, ?theme
 FROM  http://localhost/xtm2rdf/rdf8.xml
   (rtm::role-topic ?a ?z) (rtm::indicatedBy ?z ?t) 
   (rtm::role-name ?a ?z1)(rtm::name ?z1 ?name) 
   (rtm::validIn ?a ?s)(rtm::indicatedBy ?s this::taxon) (rtm::indicatedBy ?s ?theme)
AND ?name ~ Asteroidea
   this FOR  http://localhost/xtm2rdf/rdf8.xml#

RDFDB-QL syntax for TMQL expressions.

?association = inScope(?theme)
  • (rtm::validIn ?a ?s)(rtm::indicatedBy ?s ?theme)
?instance = instanceOf(?class)
  • (rtm::role-instance ?y ?z1)(rtm::indicatedBy ?z1 ?instance)
  • (rtm::role-class ?y ?z)(rtm::indicatedBy ?z ?class)
?association = templatedBy(?template)
  • (rdf::type ?association ?template)
?subclass = subclassOf(?class)
  • (rtm::role-subclass ?y ?z1)(rtm::indicatedBy ?z1 ?subclass)
  • (rtm::role-superclass ?y ?z)(rtm::indicatedBy ?z ?class)

RTM Containers

  • rtm:topic- subclass of rdf:Alt. Each resource addressed by rtm:indicatedBy properties indicates one and the same subject.
  • rtm:scope- subclass of rdf:Bag. Its rtm:indicatedBy properties constitute a unique validity context.
  • rtm:member- subclass of rdf:Bag. Its rtm:indicatedBy properties constitute an association member playing a certain role. Actually XTM distinguishes three types of rtm:member containers by the allowed properties:
    • a general <association> role can have only rtm:indicatedBy property;
    • variant-role and occurrence-role members can have rtm:constitutedBy and rtm:name properties;
    • basename-role members can have only rtm:name properties.

Why different container types?

rtm:topic, rtm:member and rtm:scope containers look similar.
Why should we distinguish them?
Can rtm:scope be considered a sub-class of rtm:member?
  • rtm:member represents the union of constituting subjects (subclass of daml:unionOf).
  • It is still debated whether rtm:scope represents a union or intersection (subclass of daml:intersectionOf) of constituting subjects.
  • rtm:topic represents an equality of constituting subjects (somewhat like rdf:Alt, no DAML equivalent)

RDF Topic Maps and DAML

  • For more on thiis see [MIT]

XTM Associations and DAML

      <rtm:scope rdf:about="#topic-maps-and-xslt-expert"/>
    <daml:unionOf parseType="daml:collection">
      <rtm:topic rdf:about="#cogitech"/>
      <rtm:topic rdf:about="#xyz"/>
    <rtm:topic rdf:about="#nikita-ogievetsky"/>

Scopes and DAML

<rtm:scope rdf:ID="not-english">
  <daml:complementOf parseType="daml:collection">
    <rtm:topic rdf:about="#english"/>

<rtm:scope rdf:ID="topic-maps-and-xslt-expert">
  <daml:intersectionOf parseType="daml:collection">
    <rtm:topic rdf:about="#topic-map-consultant"/>
    <rtm:topic rdf:about="#xslt-expert"/>

Association Templates and DAML

<rtm:template rdf:ID="family">
      <daml:onProperty rdf:resource="#wife"/>
      <daml:toClass rdf:resource="#female"/>
      <daml:onProperty rdf:resource="#husband"/>
      <daml:toClass rdf:resource="#male"/>
      <daml:onProperty rdf:resource="#wife"/>
      <daml:maxCoordinality rdf:resource="1"/>
      <daml:onProperty rdf:resource="#husband"/>
      <daml:maxCoordinality rdf:resource="1"/>


@rdf:about ambiguity in RDF

rdf:about is used to both:
  • point to resources, for which in XTM <resourceRef> would have been used;
  • point to reified statements, for which in XTM <subjectIndicatorRef> or <topicRef> would have been used.

@rdf:ID VS XTM @id

  • rdf:ID creates control vocabulary.
  • XTM id attribute serves purely for addressing purposes.
    • Vocabularies are created by baseName elements.
    • Vocabulary namespace is managed with scope.
    • One topic can have several entries in one vocabulary;
    • One topic can have entries in several vocabularies;
  • RDF vocabulary entries can be only XML IDs.
  • XTM vocabulary entries can have any character content (start with a digit, include white spaces, etc.).


XSLT Training in New York and all over the World:


  • MIT:
  • XML Topic Maps (XTM) 1.0 Specification.
  •'s Processing Model for XTM 1.0, version 1.0.2.
  • XTM 1.0 Published Subject Indicators (December 4, 2000).
  • Michel Biezunski and Steven R. Newcomb. An API to a Topic Maps Graph, in XML.
  • Resource Description Framework (RDF).
  • DARPA Agent Markup Language (DAML).
  • Nikita Ogievetsky. Harvesting XML Topic Maps from RDF.
  • Hans Holger Rath, Lars Marius Garshol. TMQL Requirements. 0.9.0.
  • XML-DEV thread. "RDF + Topic Maps = The Future & RDF? TM?".
  • Topic Maps/RDF co-operation.
  • Eric van der Vlist. Representing XML Topic Maps as RDF.
  • Graham Moore. RDF and Topic Maps: An Exercise in Convergence.
  • Martin Lacher. On the integration of Topic Maps and RDF.
  • Jonathan Borden, Tim Bray. Resource Directory Description Language (RDDL).

Budget Web Hosting and Cheap Domain Name Registration

Cogitech Inc. Made with Bexcelor & Tabular Topic Maps