Lengthy URIs can make an XML file difficult to read. A set of entity definitions in a document type (DOCTYPE) declaration that precedes ontology definitions can alleviate this problem (see http://www.w3.org/TR/owl-guide/#Namespaces). For example, consider the URI
http://research.ge.com/Acuity/sowaulo.owl#Structure
where "sowaulo" is an abreviation for Sowa upper-level ontology. This URI could be shortened to
&sowaulo;Structure
by including the following ENTITY definition in the beginning of the XML file
<!DOCTYPE rdf:RDF [ <!ENTITY sowaulo "http://research.ge.com/Acuity/sowaulo.owl#" > ] >
This is particularly useful in the "rdf:about" construct which requires complete names (see below).
A set of XML namespace declarations enclosed in an opening "rdf:RDF" tag at the beginning of an OWL ontology defines identifiers which can be used in the rest of the ontology. These identifiers include the default namespace, the explicit namespace of the current ontology, the identifiers of any supporting ontologies which may be referenced in the current ontology, and standard identifiers such as "owl" and "rdf". For example, an ontology of the work-centered support concepts problem-vantage-frame (pvf.owl) might have the following namespace declaration:
<rdf:RDF xmlns ="http://research.ge.com/Acuity/pvf.owl#" xmlns:pvf ="http://research.ge.com/Acuity/pvf.owl#" xml:base ="http://research.ge.com/Acuity/pvf.owl" xmlns:sowaulo ="http://research.ge.com/Acuity/sowaulo.owl#" xmlns:owl ="http://www.w3/org.2002/07/owl#" xmlns:rdf ="http://www.w3.org.1999/02/22-rdf-syntax-ns#" xmlns:rdfs ="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"> .......... </rdf:RDF>
If the DOCTYPE declaration described above were used, along with a similar one for "pvf", the namespace declaration could also be shortened to the following:
<rdf:RDF xmlns ="&pvf;" xmlns:pvf ="&pvf;" xml:base ="&pvf;" xmlns:sowaulo ="&sowaulo;" xmlns:owl ="http://www.w3/org.2002/07/owl#" xmlns:rdf ="http://www.w3.org.1999/02/22-rdf-syntax-ns#" xmlns:rdfs ="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"> ........ </rdf:RDF>
Note that namespace declarations such as these only make an unambiguous definition of an identifier. The referenced ontology is not otherwise accessed. To actually include another ontology, and "owl:imports" tag is used inside the "owl:ontology" tag (see http://www.w3.org/TR/owl-guide/#OntologyHeaders).
One thing which seemed to me to be missing from many introductions to OWL is the difference between the usage of rdf:resource and rdf:about. The tag rdf:resource is used to reference a resource. Under certain circumstances, e.g., the name is defined in the current document, it may referenced in "short" form. In other circumstances the complete name must be used.
The rdf:about construct is used to extend the definition of a resource which has already been defined, possibly in a different document. This example, explained below, illustrates these two constructs. Note that only complete names can be used in the rdf:about construct. However, an RDF Entity can be used to define the complete name and the "&<name>;" substitution will make the construct legal.
Example