Note: This is not the latest SHOE specification.
Latest version of this document: http://www.cs.umd.edu/projects/plus/SHOE/spec.html
Version 0.96 of this document: http://www.cs.umd.edu/projects/plus/SHOE/spec0.96.html
Version 0.95 of this document: http://www.cs.umd.edu/projects/plus/SHOE/spec0.95.html
Version 0.90 of this document: http://www.cs.umd.edu/projects/plus/SHOE/spec0.9.html
This specification describes SHOE, an extension to HTML which provides a way to incorporate machine-readable semantic knowledge in HTML or other World-Wide Web documents. This specification describes:
Further, a proposed addition to the specification provides a mechanism for adding simple semantics in the form of simplified Horn clauses.
The intent of this specification is to make it possible for user-agents, robots, etc., to gather truly meaningful information about web pages and documents, enabling significantly better search mechanisms and knowledge-gathering.
The general way one goes about this is as follows:
We're playing a bit fast-and-loose with the term ontology here. In this specification, ``ontology'' simply means an ISA hierarchy of classes/categories, plus a set of atomic relations between these categories. Categories inherit relations defined for parent categories. The proposed addition to the specification defines more sophisticated inferential relationships.
User agents following this specification should be aware that assertions made by HTML pages are not facts, but claims. I.e., if element x claims that element y is related with relation r to element z, then the user-agent should not be entering r(y,z) into its database (i.e., "Now I know that y is related to z with the relationship r!!"). Instead, it should be entering something along the lines of r(x,y,z) into its database (i.e., "x is claiming that y is related to z with relationship r."). This is an important distinction: it's perfectly fine for HTML pages out there to be making completely false claims; one shouldn't simply accept them as truth. For similar reasons, HTML pages can only make assertions, not retractions.
Terms not described here may be found in the HTML 2.0 specification.
To create keys for subinstances, add to the page instance's unique key a pound-suffix such as #MyDog. For example, http://www.cs.umd.edu#MyDog is a valid key for a subinstance located at http://www.cs.umd.edu. It's good style for this unique key to correspond with an actual anchor in the document.
The unique key of a non-SHOE-conformant document is defined to be one particular absolute URL of the document, chosen for the document by a SHOE-conformant document which references it.
Except as specified, all declarations must be made in the BODY section of an HTML document.
An HTML document may contain any number of ontology definitions. Each ontology definition should use a unique name. Ontology definitions are accompanied with a version number. If an ontology completely subsumes previous versions of the same ontology (it contains all the rules defined in those versions), it may declare itself to be backward-compatible with those versions. To begin an ontology definition, use:
<ONTOLOGY "ontology-unique-name"
VERSION="version"
[BACKWARD-COMPATIBLE-WITH="version list"]
[DESCRIPTION="text"]>
To end an ontology definition, use:
</ONTOLOGY>
All rules and extensions in an ontology must appear between the beginning and ending declarations. Ontologies may not be nested or overlap.
An ontology may be declared to extend one or more existing ontologies. This means that it will use elements in those ontologies in its own rules. To distinguish between those elements and its own elements, an ontology must provide a unique prefix for each ontology it extends. This will be prefixed to elements borrowed from each particular ontology whenever they are referred to. To declare that an ontology is extending another ontology, use:
<ONTOLOGY-EXTENDS "ontology-unique-name"
VERSION="version"
PREFIX="prefix"
[URL="URL"]>
Inside an ontology definition, an ontology may declare various new categories which instances can belong to. Categories should descend from one or more parent categories. To declare a new category, or to add new parent categories for a category, use:
<ONTDEF CATEGORY="category-name"
[ISA="parent-category-list"]
[DESCRIPTION="text"]>
A particular category should not be defined more than once within an ontology's declaration.
Inside an ontology definition, an ontology may declare various new valid relationships between category instances or between category instances and data. To declare a relationship, use:
<ONTDEF RELATION="relation-name"
ARGS="element-list"
[DESCRIPTION="text"]>
CATEGORY establishes a relationship not with category instances but with categories themselves. RELATION establishes a relationship not with instances but with other relationships. These last two elements are rare and should only be used in special circumstances.
A particular named relationship should not be defined more than once within an ontology's declaration.
To reduce the number of prefixes, an ontology may rename a category or relation (plus its prefix chain) to a simpler name, so long as this name is not used in any other category or relation in the ontology. For example, an ontology could rename the category cs.junk.foo.person to simply person, so long as person is not defined elsewhere in the ontology.
Ontologies are not permitted to rename (or rename elements to) the following keywords: STRING, NUMBER, DATE, TRUTH, CATEGORY, or RELATION. To rename a category or relation, use:
<ONTDEF RENAME="element-name"
TO="new-element-name">
Except as specified, all declarations must be made in the BODY section of an HTML document.
SHOE-conformant HTML documents must declare themselves page instances and provide a unique key for themselves. To declare an HTML document to be a page instance, add the following text to the HEAD section of the document:
<META HTTP-EQUIV="Instance-Key"
CONTENT="key">
A document may declare zero or more subinstances. Subinstances may not overlap or be nested in each other. To declare the start of a subinstance, use:
<INSTANCE "key">
To mark the end of the section of a subinstance, use:
</INSTANCE>
All relationship and category declarations made within a subinstance belong to that subinstance. All relationship and category declarations made outside a subinstance belong to the page instance.
Before you can classify documents or establish relationships between them, you'll need to define exactly which ontologies these classifications and relations are derived from, and associate with each of these ontologies some prefix unique to that ontology. An HTML document may declare that is using as many ontologies as it likes, as long as each ontology has a unique prefix in the document. To declare that a page instance and all its subinstances use a particular ontology, use:
<USE-ONTOLOGY "ontology-unique-name"
VERSION="version"
PREFIX="prefix"
[URL="URL"]>
Instances may be classified, that is, they may be declared to belong to one or more categories in an ontology, using the CATEGORY tag:
<CATEGORY "prefixed.category"
[FOR="key"]>
Instances may declare relationships with elements. To explicitly declare relationships between two elements, use:
<RELATION "prefixed.relationship"
[FROM="key"]
[TO="key"]>
If a tag (FROM or TO) is not declared, the element type for that tag must be INSTANCE, and the key for the instance is assumed to be that of the enclosing subinstance, or (if there is no enclosing subinstance) the page instance. If the tag is declared, and the type of the tag's argument is an instance, then it provides the key.
It's possible to wrap existing HTML body text and declare it to be a relationship. This is done by:
<ATTRIBUTE "prefixed.relationship"
attribute text
</ATTRIBUTE>
This is functionally the same as declaring:
<RELATION "prefixed.relationship"
TO="attribute text">