Wikitopics

From Meta, a Wikimedia project coordination wiki

Wikitopics Extension[edit]

Mediawiki lacks an index to both the information stored within a wiki and to related information available in other wikis. The best the Semantic/Mediawiki stack has to offer today is Special:FacetedSearch, AllPages and manually-crafted Portal pages. It is proposed that Wikidata be positioned as a topical index to the multilingual corpus of Mediawiki in the belief that this orientation improves the wiki-user experience as a chief objective while at the same time harvesting infobox data for external consumption. A topic-orientation to the Wikidata repository would have as a by-product mechanics for displaying topical names-value pairs for infoboxes.

Wikidata does not need too much a new paradigm of its own creation -- it can leverage and extend as necessary the existing stack of international information standards and Semantic/Mediawiki standard practices & software:

  • The ISO Topic Map metamodel (TMM) controls the design of parser functions and user interfaces.
  • The NIF ontology is incorporated into the ontology for Wikitopics which shapes API designs.
  • The SKOS ontology is used to model the Subject Namespace.
  • The Dublin Core ontology is used to capture provenance data.
  • Semantic Mediawiki subobjects are primarily used to interface to a triples store, and its query language and numerous output formats are used to create transcludable content.
  • Interwiki transclusion is used to easily share formatted & unformatted structured content.
  • Wiki page naming conventions are used to name subobjects in an equally meaningful manner.
  • Declarative XSLT/XPATH programming methods are the basis for generating formatted information.

The basic design approach of this proposal is to

  1. use existing technologies whenever possible
  2. accommodate existing SMW installations installing the Wikitopics extension(s)
  3. pursue functional upgrades that create the maximum number of stakeholders

By embracing & extending topic maps, Mediawiki can better compete in ISO-9000 and knowledge management markets against Web 2.0 platforms featuring open-source topic maps plugins (see Wordpress, Ruby and Drupal). Although statistics about the popularity of these plugins are difficult to find, Mediawiki can expect to benefit itself to the degree these platforms are no longer distinct in the marketplace with regard to topic management.

Background[edit]

Until recently, topic maps could not easily (if at all) be implemented on the Mediawiki platform. The major impediment has been that which primarily distinguishes the Resource Description Framework (RDF) and the Topic Maps (ISO/TM) architectures: RDF's model is unary and ISO/TM's model is n-ary, a distinction embodied in the ISO/TM's Association entity. However, ISO/TM Associations can now be implemented as subobjects, a data structure created by Semantic Mediawiki developers specifically to capture n-ary relations among resources (that is, among topics).

The Topic Maps architecture is ending the initial phase of its lifecycle (see Lessons Learned), with various implementing platforms achieving remarkable market thresholds (see Drupal, Ontopedia, Bumblehood, Ontopia, Topincs). Efforts are also afoot to create topic maps from Wikimedia Foundation repositories (see Mappify, TopicMap.com, transforms research).

Proposed Extension[edit]

The Mediawiki Topic Maps (wikitopics) extension implements a data model and parser functions to manage & navigate zero or more topic maps attached to a wikipage.

Key wikipage transclusions[edit]

  • {{wikidata:Thomas Jefferson}} transcludes a formatted topic presentation (with RDF/a)
  • {{wikidata:Index:Thomas Jefferson}} transcludes a formatted topic index (with RDF/a)
  • {{wikidata:Topic:Thomas Jefferson}} transcludes raw JSON structures
  • {{wikidata:Infobox:Thomas Jefferson}} transcludes a formatted infobox (with RDF/a)

Key interface requirements[edit]

First, the NLP Interface Framework (NIF) is the most immediate interface to a growing class of tools necessary to automate page annotation and to detect infobox data. Second, the user interface is significantly enhanced by page topicmaps: easily found in a "topic" or "mind-map" tab for every wiki page, these will be an attractive & exciting new public feature.

Key Wikitopics namespaces[edit]

  • The Index Namespace contains a formatted index hierarchy for any given topic.
  • The Infobox Namespace contains a formatted infobox for any given topic.
  • The Property Namespace holds definitions of (page and) subobject properties.
  • The Subject Namespace holds ISO Subject definitions in published indexes.
  • The Tag Namespace holds adjectives adverbs and (past) participles and functions like the Category namespace, each classified according to SKOS and NIF.
  • The Topic Namespace is, like Talk, paired with each namespace eg Topic:Thomas Jefferson is paired with (Main:)Thomas Jefferson. The {{TOPICSPACE}} magic word identifies the topic namespace for any page. The Topic namespace holds the topic-map(s) defined for the {{SUBJECTSPACE}} page, that is, triples relevant to its index entries AND to named-value pairs within its infobox.
  • The Transform Namespace contains xslt-stylesheet directives for JSON object processing
  • The Type Namespace holds singular noun and noun phrases, i.e., RDFS Class descriptions, annotated to identify whether instances correspond to a wiki namespace; a wiki namespace alias; or a set of typed pages within a namespace.

Namespace Manager[edit]

Topic map annotations typically involve naming a "type" token, followed by a colon & then followed by the topic's name; their scheme matches well with Mediawiki's namespace:pagename scheme. An inventory of these namespaces (MW currently allows 64K namespaces) needs to be centralized into one namespace, called Type. The Category namespace would be deprecated for RDFS Class definitions. This namespace contains metadata about the (extent of) an RDFS Class, i.e., its implementation as either an Interwiki, a Namespace, a Namespace Alias, a Subobject or Nil (i.e., it is an axiomatic unsubstantiable type). Semantic Forms for a type are identified here also.

As types are added, modified or deleted by wiki administrators and others managing the controlled type vocabulary, the extension is able to (a) assign re-assign & remove MW namespaces and their aliases (b) move pages in bulk between namespaces and (c) re-set in bulk the Property:Type attribute for pages.

Topic Navigator[edit]

As each page exists within a wiki-wide topic map (as well as names its own topic map), a tree of "related topics" can be displayed in a left-hand navigation toolbar for any page. Related topics are displayed by type or by instance. Type Display is pictured as a SRF Tag Cloud, using the count of pages in each namespace as the discriminator. Instance Display shows a list of related topics entered by a user.

When a page is edited, Topic Navigator manages instance topics editable by an author as related to the page. Autocompletion should show all hyperlinks referenced by the page as quick-pick options.

Topic Exchanger[edit]

To maintain the 'open' posture of wikis, topic maps need to be both an import and export option using the XTM or other XML-based standardized protocol. Exchanger must import and export the page's own 'topic map', i.e., its attribute set, as well as its set of Associations & Occurrences. The Exchanger should be able to export a wiki's Topic Maps into RDF using any of the established protocols (XML, JSON, etc) and to import RDF and create topic maps therefrom.

Topic Merger[edit]

The Topic Maps community has established rules relating to the key process of merging topics. These need to be encoded into a separate tool that can merge topics both physically and logically. Physical merging involves a literal aggregation of wiki pages -- at a minimum it performs entity substitutions of transcluded material.

Logical mergers are driven in large part by the basic axiom that like-named pages in different namespaces are mergeable. For instance, Person:John Smith is a page that contains topical information about John, as a Person, while Consultant:John Smith contains topical information about John, as a Consultant. Such logical topic mergers are anticipated to be a key feature of query engines, as the resulting merged-object can be chosen as the basis for query predicates and attribute retrievals. Software that performs the topic merger should be packaged in a manner consistent with the design of Mediawiki APIs.

An interface is proposed for Topic Merger to provide user views of a mergeable set of namespace-qualified topics.

Wikitopics Ontology[edit]

The underlying ontology is represented by pages in the Tag: Property: and Type: namespaces.

Tag Namespace[edit]
  • common adjectives
  • common adverbs
  • common participles
Property Namespace[edit]
  • common prepositions
  • ISO-standardized abbreviations representing
    • languages, for text strings
    • measurement units, for mixed-numeric expressions
    • timezones, for time expressions
    • currency types, for financial expressions
  • common possessive verbs
  • common existential verbs
Type Namespace[edit]
  • SKOS, RDF, OWL and other key ontologies are fully mapped
  • common story elements (who, when, why, what, ...) are SUMO foundational
  • Wiki object model should be represented

Formating infoboxes or indexes[edit]

A proposed XSLT-style transform against all information stored for a page, including its page properties, page subobjects and page model is executed from within the LUA template programming environment. XSLT provides the mechanics for a declarative processing model as a vast improvement over the procedural model now entailed by conventional template programmming. A system of information axes, as notionally provided by XPATH, is adopted in this context. Additionally MVC interfaces supporting schemes should be specified on a {{#transform}} parser function.

Extension Design Notes[edit]

References[edit]

Object & Subobject Naming[edit]

Subobject Design[edit]

  • Every page in a wiki is a topic and, to participate in the wiki's topic map, maintains its Topic Map names, identities (as a subject locator or identifier) and occurrences (wikipage names and occurrence fragment names) in the {{FULLPAGENAME}}#{{FULLPAGENAME}} subobject of its page. ^subject, ^title & ^identifier properties are reserved for a topic's topic-map information.
  • The "Topic Map" namespace defines a topic map apart from a page; these can be privatized by a user via Halo ACL. Any page can transclude the Topic Map:pagename to incorporate its display. The "Subject" namespace defines published subject identifiers that can be referenced by multiple topic maps.
  • If any semantic form is displayed for a typed object in a map, it must be the same as for a typed namespace, and it must maintain the Format & Type object-properties for facet-browsing. A consistent model appears to demand all (formal?) properties are stored in a map, duplicating Format & Type. Text and page properties are accessed as follows (note the double colon and that a new SMW selection operator is needed):
{{#ask:[[~{{FULLPAGENAME}}#Format::]][[^creator::{{FULLPAGENAME}}]]|?^subject=|?=}}
This returns a list of hrefs and wiki pagenames in clear text assigned to a Dublin Core Format property for page {{FULLPAGENAME}}.

{{#ask:[[~{{FULLPAGENAME}}#Type::]][[^creator::{{FULLPAGENAME}}]]|?^subject=|?=}}
This returns a list of hrefs and wiki pagenames in clear text assigned to a Dublin Core Type property.

{{#arraymap:{{#ask:[[~{{FULLPAGENAME}}#has::Mother:]][[^creator::{{FULLPAGENAME}}]]|?^subject=|?=|sep=;}}|;|Z|{{#ask:[[~Z]][[^creator::Z]]|?^subject=|?=|sep=;}};}}
This returns a list of role-type:pgnames and-or role fragments. Then it is exploded to yield a list of hrefs and wiki pagenames in clear text assigned to a 'has' property whose values' namespace is "Mother".

{{#ask:[[~{{FULLPAGENAME}}#^title::]][[^creator::{{FULLPAGENAME}}]]|?^text=|?=}}
This returns a list of text values assigned to a textual Dublin Core ^title property for page {{FULLPAGENAME}}.

  • The name of a Topic Map subobject follows the same pattern as a wiki pagename (i.e., interwiki: lang: namespace: pagename):
scope-name: lang: type-name: pagename
or if an occurrence-type is specified then the pattern is
property-name:: scope-name: lang: type-name: pagename
    • pagename in a subobject is itemIdentity
    • language is necessary when different than the wiki's default language
    • if scope-name is not present in a subobject name, "no-scope" applies
    • xtm & xmm (topic map, merge map) are interpreted as type-names
    • topic-type, occur-type and name-type are defined Type pages
    • assoc-type is a defined Property page
  • Dublin Core property names follow this pattern:
    • datatype (string) properties are stored in multi-valued properties named with a ^
    • object (links) properties are stored in multi-valued properties named with a capital letter

Triples Layout[edit]

Subject Predicate Object
Sorted by predicate
ns:pgnm#topic-type: itemid ^identifier list of subject identifiers eg #subj:href, #loc:href
ns:pgnm#FULLPAGENAME ^identifier list of subject identifiers eg #subj:href, #loc:href (for a page)
ns:pgnm#xtm: itemid ^subject list of ns:pgnms & topic, association & mergemap fragment names
ns:pgnm#xmm: itemid ^subject ns:pgnm or href:itemid
ns:pgnm#topic-type: itemid ^subject list of ns:pgnms & occurrence fragment names eg #scope-name: occur-type:id
ns:pgnm#FULLPAGENAME ^subject list of ns:pgnms & occurrence fragment names eg #scope-name: occur-type:id
ns:pgnm#scope: scope-name ^subject list of ns:pgnms & #topic-type:itemid fragment names & FULLPAGENAME
ns:pgnm#scope-name: itemid ^subject ns:pgnm or fragment name
ns:pgnm#(property):: scope-name: role-type: itemid ^subject list of role-type:pgnames and-or role fragments
ns:pgnm#scope-name: occur-type: itemid ^subject ns:pgnm OR #res:href
ns:pgnm#role-type: itemid ^subject list of ns:pgnms & #topic-type:itemid fragment names & FULLPAGENAME
ns:pgnm#scope-name: occur-type: itemid ^text list of values for the occurrence
ns:pgnm#scope-name: name-type: itemid ^text resourcedata (variant name)
ns:pgnm#topic-type: itemid ^title list of fragment names eg #scope:name
ns:pgnm#FULLPAGENAME ^title list of fragment names eg #scope:name
ns:pgnm#xtm: itemid ^creator user name
ns:pgnm#(property):: scope-name: role-type: itemid ^creator #xtm:itemid or #topic-type:itemid or FULLPAGENAME (reifier)
ns:pgnm#role-type: itemid ^creator #(property):: #scope-name: itemid (reifier)
ns:pgnm#scope-name: occur-type: itemid ^creator #xtm:itemid or #topic-type:itemid or FULLPAGENAME (reifier)
ns:pgnm#scope-name: name-type: itemid ^creator #topic-type: itemid or FULLPAGENAME (reifier)
ns:pgnm#scope-name: itemid ^creator #scope-name: name (reifier)
Sorted by subject
ns:pgnm#xtm: itemid ^creator user name
ns:pgnm#xtm: itemid ^subject list of ns:pgnms & topic, association & mergemap fragment names
ns:pgnm#xmm: itemid ^subject ns:pgname or href:itemid
ns:pgnm#topic-type: itemid ^identifier list of subject identifiers eg #subj:href, #loc:href
ns:pgnm#topic-type: itemid ^subject list of ns:pgnms & occurrence fragment names eg #scope-name: occur-type:id
ns:pgnm#topic-type: itemid ^title list of fragment names eg #scope:name
ns:pgnm#scope-name: name-type: itemid ^creator #topic-type: itemid or FULLPAGENAME (reifier)
ns:pgnm#scope-name: name-type: itemid ^text resourcedata (variant name)
ns:pgnm#scope-name: occur-type: itemid ^creator #xtm:itemid or #topic-type:itemid or FULLPAGENAME (reifier)
ns:pgnm#scope-name: occur-type: itemid ^subject ns:pagename OR #res:href or FULLPAGENAME
ns:pgnm#scope-name: occur-type: itemid ^text list of values for the occurrence
ns:pgnm#scope-name: itemid ^creator #scope-name: name (reifier)
ns:pgnm#scope-name: itemid ^subject ns:pgnm or fragment name or FULLPAGENAME
ns:pgnm#(property):: scope-name: role-type: itemid ^creator #xtm:itemid or #topic-type:itemid or FULLPAGENAME (reifier)
ns:pgnm#(property):: scope-name: role-type: itemid ^subject list of role-type:pgnms and-or role fragments
ns:pgnm#scope: scope-name ^subject list of ns:pgnms & #topic-type:itemid fragment names & FULLPAGENAME
ns:pgnm#role-type: itemid ^creator (property):: #scope-name: itemid (reifier)
ns:pgnm#role-type: itemid ^subject list of ns:pgnms & #topic-type:itemid fragment names & FULLPAGENAME
ns:pgnm#FULLPAGENAME ^identifier list of subject identifiers eg #subj:href, #loc:href (for a page)
ns:pgnm#FULLPAGENAME ^subject list of ns:pgnms & occurrence fragment names eg #scope-name: occur-type:id
ns:pgnm#FULLPAGENAME ^title list of fragment names eg #scope:name

{{#arraymap:{{#show:{{FULLPAGENAME}}#{{FULLPAGENAME}}|?^subject=|sep=;}}|;|Z|{{#if:Z|{{#arraymap:{{#show:{{FULLPAGENAME}}Z|?^subject=|sep=;}}|;|Q|{{#if:Q|{{#show:{{FULLPAGENAME}}Q|?value=}}}}}} }}

Wikitopics Subobjects[edit]

Each page in a wiki has a topicmap.

returns
the fragment-name of the iso-topicmap object (created by this template) is echoed

It should be called in the following format:

{{#iso-topicmap:fragment-name
|^associations= list of fragment-names each for an iso-association object (delim=;)   
|^mergeMaps= list of fragment-names each for an iso-mergemap object (delim=;)
|^topics= list of fragment-names each for an iso-topic object (delim=;)
|^reifier= page/fragment name of an iso-topic object about this iso-topicmap
|^version= string for version identifier
}}

topicmap subobjects

<!--XTM v1.1 -->
<!ELEMENT topicMap ( topic | association | mergeMap )* >
<!ATTLIST topicMap
   id              ID        #IMPLIED
   xml:base        CDATA     #IMPLIED
   version         CDATA     #FIXED '1.1'
   xmlns           CDATA     #FIXED 'http://www.topicmaps.org/xtm/1.0/'
   xmlns:xlink     CDATA     #FIXED 'http://www.w3.org/1999/xlink'
><!--XTM v2 -->
<!ELEMENT topicMap ( itemIdentity*, mergeMap*, ( topic | association )* )
><!ATTLIST topicMap
   version         CDATA     #FIXED '2.0'
   xmlns           CDATA     #FIXED 'http://www.topicmaps.org/xtm/'
   reifier         CDATA     #IMPLIED >

{{#subobject: topicmap    <!-- reserved name -->
|contributor=
|coverage=
|creator= reifier page
|date= effective date
|description=
|format= status (adjective) categories
|identifier= itemIdentity url(s)
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source= 
|subject= mergeMap, topic & association subobjects
|title= 
|type= 
|^type= topicmap
}}

<!-- query topicmap for a wiki page -->
*{{#ask: [[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- query topic pages for a wiki page -->
*{{#ask: [[^type::topic]] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

<!-- fixed macros 
         {{categories}} = [[Category:a||b||c]]
         {{datetest}}   = [[Category:Past||Current]] derived from [[date::<{{TOMORROW}}]]
         {{stattest}}   = [[Category:Active]]
         {{maptest}}    = [[publisher::{{FULLPAGENAME}}#topicmap]]
         [[subjtest]]   = Subject::{{FULLPAGENAME}}#{{#var:topicnm}}
         {{typetest}}   = [[Type::Type:sometype]]
-->         
<!-- query a named property stored in a page's topic map -->         
*{{#ask: [[^type::association]] [[Type::Property:someprop]] 
         |mainlabel=none|?subject|?=-|template=iso-characteristics}}

<!-- query all subobjects of a category & of a type in a page's topic map -->         
*{{#ask:  [[{{typetest}}]] [[{{categories}}]] [[{{maptest}}]] [[{{datetest}}]] [[{{stattest}}]]

<!-- query topics in a page's topic map  -->         
*{{#ask: [[^type::topic]] [[{{maptest}}]] [[{{datetest}}]] [[{{stattest}}]]

<!-- query topic name subobjects in a page's topic map -->
*{{#ask: [[^type::name]] [[{{maptest}}]] [[{{datetest}}]] [[{{stattest}}]] 
         |? title |mainlabel=none }}
         
<!-- query topic name strings for a topic page -->
*{{#ask: [[^type=name]] [[{{maptest}}]] [[{{datetest}}]] [[{{stattest}}]] 
         |? ^text }}

Any page can specify a mergemap for the topicmap.

returns
the fragment-name of the iso-mergemap object (created by this template) is echoed

It should be called in the following format:

{{#iso-mergemap:fragment-name
}}
<!--XTM v1.1-->
<!ELEMENT mergeMap  ( topicRef | resourceRef | subjectIndicatorRef )* >
<!ATTLIST mergeMap
   id              ID        #IMPLIED
   xlink:type      NMTOKEN   #FIXED 'simple'
   xlink:href      CDATA     #REQUIRED
><!--XTM v2-->
<!ELEMENT mergeMap  EMPTY >
<!ATTLIST mergeMap  href   CDATA     #REQUIRED >

{{#subobject: objname
|contributor=
|coverage= 
|creator= reifier page
|date= effective date
|description=
|format= status (adjective) categories
|identifier= {{^url|href}}
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source= 
|subject=  
|title= 
|type= 
|^type= mergemap
}}

<!-- mergemaps for a topic page -->
*{{#ask: [[^type::mergemap] [[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- query names for a topic page -->
*{{#ask: [[^type::mergemap]] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

Each topicmap in a wiki has multiple topic objects.

returns
the fragment-name of the iso-topic object (created by this template) is echoed.
  • instanceOf for a topic is a Type:typename page derived from its itemIdentity - stored in the Type property if a namespace alias. If not, the namespace of a pagename or the pseudo namespace of a subobject's name is to be referenced
  • itemIdentity string(s) for a topic is its ns:pgnm(#objname) and ns:redirected aliases - no need to store
  • subjectLocator string(s) for a topic are stored in the ^subject property
  • subjectIdentifier string(s) for a topic are stored in Identifier^text
  • name subobjects for a topic are stored in ns:pgnm#nametype:itemIdentity
  • occurrence subobjects for a topic are stored in ns:pgnm#occurtype:itemIdentity
  • multiple itemIdentities are redirecting subobjects to ns:pgnm#itemtype:itemIdentity

{{#iso-topic: fragment name
|contributor=
|coverage=
|creator= reifier page
|date= effective date
|description = 
|format= status (adjective) categories
|identifier= itemIdentity 
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap) 
|relation = list of association subobject names
|rights=
|source= 
|subject= subjectIdentifier &or subjectLocator url(s)
|title = Name subobjects
|type = Type:type-name page
|^identifier=topic id
|^type= topic
}}

*{{#arraydefine:assocs|{{#ask: [[{{FULLPAGENAME}}]][[has subobject::+]][[{{subjtest]}}] [[^type::association]] |template=iso-characteristics}} *{{#arraydefine:assocs| {{#ask: [[{{FULLPAGENAME}}]][[has subobject::<q>[[^type::association]]</q>]] |mainlabel=- |?= |template=iso-char-axis-1}} # [[template:iso-char-axis-1a ]] input: 0=assoc objname {{#ask: [[assoc objname]] |?=|?coverage=|?creator=|?date=|?format=|?identifier=|?publisher=|?subject=|?type= |mainlabel=- |template=xtm char-axis-2a }} # [[template:iso-char-axis-1b ]] input: 0=occurence objname {{#ask: [[occur objname]] |?=|?coverage=|?creator=|?date=|?format=|?identifier=|?publisher=|?^subject=|?^text=|?type= |mainlabel=- |template=xtm char-axis-2b }} # [[template:iso-char-axis-2a ]] input: 0=role objname 1=scope, 2=reifier 3=date 4=categories 5=itemIdentities 6=topicmap 7=roles 8=property {{#ask: [[role objname]] |?=|?creator=|?format=|?publisher=|^relation=|?^subject=|?type= |mainlabel=- |template=xtm char-axis-3 }} # [[template:iso-char-axis-2b ]] input: 0=role objname 1=scope, 2=reifier 3=date 4=categories 5=itemIdentities 6=topicmap 7=resourceRef 9=resourceData {{#ask: [[role objname]] |?=|?creator=|?format=|?publisher=|^relation=|?^subject=|?type= |mainlabel=- |template=xtm char-axis-3 }} # [[template:iso-char-axis-3 ]] input: 0=role objname 1=reifier 2=categories 3=topicmap 4=topicref 5=itemIdentities 6=type:name {{#ask: [[{{FULLPAGENAME}}#itemidentity]] |?=|?title=|?type=|mainlabel=-|template=xtm char-axis-4 }} # [[template:iso-char-axis-4 ]] input: 0=name objnames 1=type:rolename {{#ask: [[name objname]] |?=|?coverage=|?creator=|?date=|?format=|?publisher=|?title=|?type=|?^identifier=|^text=|template=xtm char-axis-5}} # [[template:iso-char-axis-5 ]] input: 1=scope, 2=reifier 3=date 4=categories 5=topicmap 6=variants 7=type:namename 8=itemIdentities 9=value {{#ask: [[name objname]] |?=|?coverage=|?creator=|?date=|?format=|?publisher=|?title=|?type=|?^identifier= |template=xtm char-axis-5}}

  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |? ^identifier }}
  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |mainlabel=none |template=^topic indicators}} Template:^topic indicators {{#if:{{#arrayexist:indicators}}||{{#arraydefine:indicators}}}}
  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |? ^identifier }}
  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |? ^identifier }}
  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |? ^identifier }}
  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |? Type }}
  • {{#show: {{FULLPAGENAME}}#{{#var:topicnm}} |? name }}

First draft: Topic Map XML translation

<!--XTM v1.1-->
<!ELEMENT topic ( instanceOf*, subjectIdentity?, ( baseName | occurrence )* ) >
<!--XTM v2-->
<!ELEMENT topic ( ( itemIdentity|subjectLocator|subjectIdentifier )*, instanceOf?, ( name | occurrence )* ) >

{{#iso-topic:fragment-name
|^id=fragment-name of an iso-id object
|^instanceOf= type facet pagename (a logical or physical namespace) 
|^identities=list of redirects or urls used to reference the iso-topic (delim=;)
|^names=list of fragment-names each for an iso-name object (delim=;)
|^occurrences=list of pagenames or urls each an occurrence of the topic (delim=;)
|^subjectIDs=list of strings each an identifier of a subject of the topic (delim=;)
|^subjectLinks=list of pagenames or urls each an identifier of a subject of the topic (delim=;)
}}

NIF Requirement: Class Topic

source = http://nlp2rdf.lod2.eu/schema/topic/Topic
^description=A Topic is characterized by a set of lemmata that characterize its meaning
^title.en=Topic
occursIn= Domain Topic
dominatingTopic= Range Topic
hasTopic= Range Topic
characteristicLemma= Domain Topic


Each topic in a wiki can have an iso-id object.

returns
the fragment-name of the iso-id object (created by this template) is echoed

It should be called in the following format:

{{#iso-id:fragment-name
|^value=string for an id
}}

Each name in a wiki has a name object.

returns
the fragment-name of the iso-name object (created by this template) is echoed

It should be called in the following format:

{{#iso-name:fragment-name
|^identities=list of redirects or urls used to reference the iso-name object (delim=;)
|^scope=fragment name of an iso-scope object applicable to this iso-name object 
|^type=pagename for the type (ie generic name) of name 
|^value=string for the name
|^variants=list of fragment-names each for an iso-variant object (delim=;)
}}
<!--XTM v1.1-->
<!ELEMENT baseName  ( instanceOf?, scope?, baseNameString, variant* ) >
<!--XTM v2-->
<!ELEMENT name  ( itemIdentity*, type?, scope?, value, variant* ) >
<!ATTLIST name    reifier   CDATA     #IMPLIED >

{{#subobject: objname
|contributor=
|coverage= scope subobject
|creator= reifier page
|date= effective date
|description=
|format= status (adjective) categories
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source= 
|subject=  
|title= variant subobjects
|type= Type:type-name page
|^identifier= itemIdentity url(s)
|^text= value
|^type= name
}}

<!-- query names for a topic page -->
*{{#ask: [[^type::name] [[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- query names for a topic page -->
*{{#ask: [[^type::name]] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

Each name in a wiki can have one or more variant objects.

returns
the fragment-name of the iso-variant object (created by this template) is echoed

It should be called in the following format:

{{#iso-variant:fragment-name
|^identities=list of redirects or urls used to reference the iso-variant object (delim=;)
|^scope=fragment name of an iso-scope object applicable to this iso-variant object
|^resref=transcludable page/fragment name 
|^resdata=actual value of an iso-variant for a name
}}

variant subobjects

<!--XTM v1.1-->
<!ELEMENT variant ( parameters, variantName?, variant* ) >
<!--XTM v2-->
<!ELEMENT variant ( itemIdentity*, scope, ( resourceRef | resourceData ) ) >
<!ATTLIST variant     reifier  CDATA     #IMPLIED >

{{#subobject: objname
|contributor=
|coverage= scope subobject
|creator= reifier page
|date= effective date
|description=
|format= status (adjective) categories
|identifier= itemIdentity url(s)
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source= 
|title= 
|type= 
|^subject= resourceRef 
|^text= resourceData
|^type= variant
}}

<!-- query variants for a topic page -->
*{{#ask: [[^type::variant]] [[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- query variant names for a topic page -->
*{{#ask: [[^type::variant]] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

Any ^iso:association ^iso:occurrence, ^iso:name or ^iso:variant object can specify a ^iso:scope object.

returns
the fragment-name of the ^iso:scope object (created by this template) is echoed

It should be called in the following format:

{{^iso|scope|fragment-name
|topic = list of pagenames for topics comprising the scope
|topic^oid =list of fragment-names for topics comprising the scope
|topic^url = list of urls locating topics comprising the scope
}}

Each iso-name, iso-association &or iso-occurrence in a wiki can reference a iso-type object.

returns
the fragment-name of the iso-type object (created by this template) is echoed

It should be called in the following format:

{{#iso-type:fragment-name
|^topicrefs=list of urls, page-names, &or fragment-names each for an iso-topic object (delim=;)
}}

Each topic in a wiki can have iso-occurrence objects.

returns
the fragment-name of the iso-occurrence object (created by this template) is echoed

It should be called in the following format:

{{#iso-occurrence:fragment-name
|^reifier= page/fragment name of an iso-topic object about this iso-occurrence object
|^identities=list of redirects or urls used to reference the iso-occurrence object (delim=;)
|^type=pagename for the type (ie generic name) of the iso-occurrence object 
|^scope=fragment name of an iso-scope object applicable to this iso-occurrence object
|^resref=page/fragment name 
|^resdata=actual occurrence data of an iso-topic
}}
<!--XTM v1.1-->
<!ELEMENT occurrence ( instanceOf?, scope?, ( resourceRef | resourceData ) ) >
<!--XTM v2-->
<!ELEMENT occurrence ( itemIdentity*, type, scope?, ( resourceRef | resourceData ) ) >
<!ATTLIST occurrence  reifier  CDATA     #IMPLIED >

{{#subobject: objname 
|contributor=
|coverage= scope subobject
|creator= reifier page
|date= effective date
|description=
|identifier= itemIdentity url(s)
|format= status (adjective) categories
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source= 
|title= 
|type= Type:type-name page 
|^subject= resourceRef 
|^text= resourceData
|^type= occurrence
}}

<!-- query occurrences for a topic page -->
*{{#ask: [[^type::occurrence] [[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- query occurrences for a topic page -->
*{{#ask: [[^type::occurrence]] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

Each iso-occurrence or iso-variant in a wiki can have an iso-resdata object.

returns
the fragment-name of the iso-resdata object (created by this template) is echoed

It should be called in the following format:

{{#iso-resdata:fragment-name
|^datatype=pagename of dataype of value
|^value=string value
}}

Each topicmap in a wiki can have one or more association objects.

returns
the fragment-name of the iso-association object (created by this template) is echoed

It should be called in the following format:

{{#iso-association:fragment-name
|^identities=list of redirects or urls used to reference the iso-association object (delim=;)
|^type=pagename for the type (ie generic name) of association
|^scope=fragment-name of an applicable iso-scope object
|^roles=list of fragment-names each for an iso-role object (delim=;)
}}
<!--XTM v1.1-->
<!ELEMENT association ( instanceOf?, scope?, member+ ) >
<!--XTM v2-->
<!ELEMENT association ( itemIdentity*, type, scope?, role+ ) >

{{#subobject: objname 
|contributor= 
|coverage= scope subobject
|creator= reifier page
|date= effective date
|description=
|format= adverbial categories
|identifier= itemIdentity url(s)
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source= 
|subject= role/member subobjects 
|title= 
|type= Property:pagename
|^type= association
}}

<!-- associations for a topic page -->
*{{#ask: [[^type::association[[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- association names for a topic page -->
*{{#ask: [[^type::association] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

Each association in a wiki can have one or more role objects.

returns
the fragment-name of the iso-role object (created by this template) is echoed

It should be called in the following format:

{{#iso-role:fragment-name
|^identities=list of redirects or urls used to reference the iso-role object (delim=;)
|^type=pagename for the type (ie generic name) of role
|^topicref= url, page-name, or fragment-name used to reference the iso-role object (delim=;)
}}
<!--XTM v1.1-->
<!ELEMENT member ( roleSpec?, ( topicRef | resourceRef | subjectIndicatorRef )* ) >
<!--XTM v2-->
<!ELEMENT role ( itemIdentity*, type, topicRef ) >
<!ATTLIST role  reifier     CDATA     #IMPLIED >

{{#subobject: objname
|contributor=
|coverage=
|creator= reifier page
|date=
|description=
|format= status (adjective) categories
|identifier= 
|language=
|publisher= PSI:topicmap page (default={{FULLPAGENAME]]#topicmap)
|relation= 
|rights=
|source=
|title= 
|type= Type:type-name page 
|^relation= topicRef (resourceRef or subjectIndicatorRef?) strings 
|^subject=itemIdentity url(s)
|^type= role
}}

<!-- query roles for a topic page -->
*{{#ask: [[^type::role] [[publisher::{{FULLPAGENAME}}#topicmap]] }}

<!-- query role types for a topic page association -->
*{{#ask: [[^type::topic]] [[publisher::{{FULLPAGENAME}}#topicmap]] [[date::<{{TOMORROW}}]] [[Category:Active||Reviewed]] |? ^text }}

Predefined topic names

  • tm:instance - Representing the type of the instance role of the TMDM. Can be used as role type.
  • tm:name - Representing the name-type of the TMDM. Every name item is an instance of this type. Can be used to filter characteristics representing a name item in the meaning of the TMDM.
  • tm:occurrence - Representing the occurrence-type of the TMDM. Every occurrence item is an instance of this type. Can be used to filter characteristics representing an occurrence item in the meaning of the TMDM.
  • tm:subclass-of - Representing the type of the supertype-subtype associations of the TMDM. Can be used as association type.
  • tm:subclass - Representing the type of the subtype role of the TMDM. Can be used as role type.
  • tm:subject - Representing the topic-type of the TMDM. Every topic item and topic type is an instance of this topic type. Can be used as a wildcard for undefined topic actors.
  • tm:superclass - Representing the type of the supertype role of the TMDM. Can be used as role type.
  • tm:type - Representing the type of the type role of the TMDM. Can be used as role type.
  • tm:type-instance - Representing the type of the type-instance associations of the TMDM. Can be used as association type.

Topic Map Tools[edit]

XTM Versions The extension needs to support both XTM v1.1 (2005) and XTM v2.0 (2006). The differences are:

  1. a single topic reference is now required as the child of role.
  2. baseName element has been replaced by name.
  3. instanceOf element has been replaced by type everywhere except inside topic.
  4. baseNameString element has been replaced by the value element.
  5. datatype attribute has been added to resourceData, which also now supports embedded markup.
  6. id attribute has been removed from all elements except topic, and the reifies attribute has been added on some elements.
  7. itemIdentity, subjectLocator, and subjectIdentifier elements have been added.
  8. member element has been replaced by role.
  9. mergeMap element must now come before all topic and association elements.
  10. mergeMap element no longer supports added scope.
  11. namespace URI has changed.
  12. parameters element has been replaced by scope.
  13. reifier attribute has been added, replacing the implicit reification syntax in XTM 1.0 using the subjectIndicatorRef element.
  14. roleSpec element has been replaced by type.
  15. subjectIndicatorRef element has been removed.
  16. type element is now allowed inside name.
  17. type element is now required inside occurrence, association, and role.
  18. variant element can no longer be nested.
  19. variantName and subjectIdentity elements have been removed.
  20. version attribute has been added to the topicMap element.
  21. XTM no longer uses XLink and XML Base.

FOSS transforms

Further, from topicmapslab:

  • XTM 1.0 to CTM 1.0 (CTM is the abbreviation for Topic Maps Compact Syntax)
  • XTM 1.0 to XTM 2.0 / XTM 2.1
  • XTM 2.0 / XTM 2.1 to CTM 1.0
  • XTM 2.0 / XTM 2.1 to JTM 1.0
  • XTM 2.0 / XTM 2.1 to XTM 1.0 / XTM 1.1
  • TM/XML 1.0 to CTM 1.0
  • TM/XML 1.0 to Snello
  • TM/XML 1.0 to XTM 1.0 / XTM 1.1
  • TM/XML 1.0 to XTM 2.0 / XTM 2.1

XTM2Wiki.xsl transform

TopicMap Element

Topic Element
<!--  XTM v1.1 example -->
<topic id="Refines">
  <baseName>
    <scope><topicRef xlink:href="#Element"/></scope>
    <baseNameString>Refined by</baseNameString>
    </baseName>
  <baseName>
    <baseNameString>Refines/baseNameString>
    </baseName>
  </topic>  
XSLT-transformed template call
{{iso-topic
|rdf:about="Refines"
|baseName=
{{iso-baseName|baseNameString=Refined by 
  |scope=#Element}}
{{iso-baseName|baseNameString=Refines}}
}}
Occurrence Element
<!--  XTM v1.1 example -->
<topic id="rights">
  <instanceOf><topicRef xlink:href="#Element"/></instanceOf>
  <subjectIdentity>
    <subjectIndicatorRef 
      xlink:href="http://purl.org/dc/elements/1.1/rights"/>
    </subjectIdentity>
  <baseName><baseNameString>Rights</baseNameString></baseName>
  <occurrence>
    <instanceOf><topicRef xlink:href="#Date_Issued"/></instanceOf>
    <resourceData>1999-07-02</resourceData>
    </occurrence>
  <occurrence>
    <instanceOf><topicRef xlink:href="#Status"/></instanceOf>
    <resourceData>recommended</resourceData>
    </occurrence>
  <occurrence>
    <instanceOf><topicRef xlink:href="#Comment"/></instanceOf>
    <resourceData>Typically, rights information 
    includes a statement about various property rights 
    associated with the resource, including 
    intellectual property rights.</resourceData>
    </occurrence>
  <occurrence>
    <instanceOf><topicRef xlink:href="#Definition"/></instanceOf>
    <resourceData>Information about rights held in 
    and over the resource.</resourceData>
    </occurrence>
  </topic>
XSLT-transformed template call
{{iso-topic
|rdf:about=#rights
|instanceOf=#Element
|subjectIdentity=
  http://purl.org/dc/elements/1.1/rights
|baseName=
{{iso-baseName|baseNameString=Rights}}
|occurrence=
{{iso-occurrence
  |instanceOf=#Date_Issued
  |resourceData=1999-07-02}}
{{iso-occurrence
  |instanceOf=#Status     
  |resourceData=recommended}}
{{iso-occurrence
  |instanceOf=#Comment    
|resourceData=Typically, rights information 
includes a statement about various property 
rights associated with the resource, including 
intellectual property rights.}}
{{iso-occurrence
  |instanceOf=#Definition 
  |resourceData=Information about rights held 
   in and over the resource.}}

}}
Association Element
<!--  XTM v1.1 example -->
<association>
  <instanceOf>
    <topicRef xlink:href="#Refines"/>
  </instanceOf>
  <member>
    <roleSpec><topicRef xlink:href="#Element"/></roleSpec>
    <topicRef xlink:href="#date"/>
    </member>
  <member>
    <roleSpec><topicRef xlink:href="#Refinement"/></roleSpec>
    <topicRef xlink:href="#available"/>
    </member>
  </association
XSLT-transformed template call
{{iso-association
|instanceOf=#Refines
|member=
{{iso-member|roleSpec=#Element |topicRef=#date}}
{{iso-member|roleSpec=#Refinement |topicRef=#available}}
}}
Member/Role Element
<!--  XTM v1.1 example -->
XSLT-transformed template call
{{iso-member
}}
Name/baseName Element
<!-- XTM v1.1  example -->
XSLT-transformed template call
{{iso-variant
}}
MergeMap Element
<!-- XTM v1.1 example -->
XSLT-transformed template call
{{iso-mergemap
}}
  • use mw's namespace manager as a base
  • provide same navigation axes as TMQL4J
  • integrate SRF with Topic Map Query parser function.
  • look at using TreeView for topic navigation

Association navigation axes

reifier
The reifier axis represents the relationship between an association item or an characteristic item and its reifying topic item. ( {{#tmqry|axis=reifier}} )
roles
The roles axis represents the relationship between an association item and its roles. ( {{#tmqry|axis=roles}} )
scope
The scope axis represents the relationship between an association item or an characteristic item and its scoping topics. ( {{#tmqry|axis=scope}} )
roletypes
The roletypes axis represents the relationship between an association item and its role types. ( {{#tmqry|axis=roletypes}} )

Locator Object navigation axes

atomify
The atomify axis represents the relationship between a characteristics or locator object and its literal. ( {{#tmqry|axis=atomify}} )
ratomify
The ratomify axis is a special variant of the atomify axis. In contrast to the atomify axis, the left hand literal will be interpreted as an regular expression. ( {{#tmqry|axis=ratomify}} )

Occurrence navigation axes

datatype
The datatype axis represents the relationship between an occurrence or variant and its datatype. ( {{#tmqry|axis=datatype}} )

Role navigation axes

players
The players axis represents the relationship between a role item and its players. ( {{#tmqry|axis=players}} )

Topic navigation axes

characteristics
The characteristics axis represents the relationship between a topic item and its characteristics ( merged concept of names and occurrences ). ( {{#tmqry|axis=characteristics}} )
id
The id axis represents the relationship between a topic map construct and its id. ( {{#tmqry|axis=id}} )
indicators
The indicators axis represents the relationship between a topic item and its subject-identifiers. ( {{#tmqry|axis=indicators}} )
item
The item axis represents the relationship between a topic item and its item-identifier. ( {{#tmqry|axis=item}} )
locators
The locators axis represents the relationship between a topic item and its subject-locators. ( {{#tmqry|axis=locators}} )
traverse
The traverse axis represents the relationship between topic items, playing the same association items. ( {{#tmqry|axis=traverse}} )
typed
The typed axis represents the relationship between typed constructs and the topic type. ( {{#tmqry|axis=typed}} )
variants
The variants axis represents the relationship between a topic name and its variants. ( {{#tmqry|axis=variants}} )

Topic Type navigation axes

supertypes
The supertypes axis represents the relationship between topic types and its supertypes. ( {{#tmqry|axis=supertypes}} )
types
The types axis represents the relationship between topic types and its instances. ( {{#tmqry|axis=types}} )

Value Proposition [edit]

Readers
Guided navigation into & within a wiki is a large improvement over the current search, display, maybe hyperlink paradigm. The current paradigm is fully dependent on hyperlinks in the article that simply may not have ever been authored. Though SMW does help with its Special:Browse tool, it is a tool that depends on annotations that may not have ever been authored either.
Authors
Context definition for a given article can help authors organize their content while ensuring that the article is listed for those readers who identify search-contexts. In effect, authors can improve the "SEO" rating for their work and, with context-related authoring tools, improve the quality of their work.
Annotation of page content is simplified as well. Rather than searching sequential lists of Property names, an annotator searches hierarchical lists of Type names. This is due to the changed format, rather than annotating content as [[has Employee::John Smith]], the annotation is [[has::Employee:John Smith]].
Ontologists
Controlled professional vocabularies become a reality replacing the chaos of the Category and Property namespaces. The Category namespace tends to revert to its historical use as tags indicative of lists, a plural concept not a singular one. The Property namespace -- which would be generally locked down -- eliminates the senseless duplication often seen in many ontologies today (where both a Category and a Property with the same name, are defined).
Organizations
Institutional memory and costs are improved as semantic tools take a major step towards their commoditization. By enhancing an RDF tool like SMW built upon a tool like MW with its wide market awareness, to encompass an international standard like Topic Maps, eliminates organizations' hesitance and uncertainty about what semantic tools they should deploy.
Administrators
Better performance of larger wiki installations will be measurable as database indexes become stratified by namespace thereby reducing search times. By using the Namespace Manager, database indexes can be configured to provide optimal performance.

{{#css: pre {background-color:lightgreen} code {background-color:yellow} }}