Linguistic and semantic annotations, rhetorical structure and argumentation formats are some of the numerous scenarios where data or metadata are desired in addition to document trees, e.g. SSML and XHTML documents. In SSML contexts, such data can facilitate prosodic speech synthesis and, in XHTML contexts, many new features are possible.
A solution for document and modular document component semantics is a document object model interface, e.g.
document.semantics, a graph-based interface. The contents of such a graph could be:
- From content regions in a document as per:
- Linked to from a document as per:
<script type="application/rdf+xml" src="..." />,
<semantics type="application/rdf+xml" src="..." />or
<link rel="semantics" type="application/rdf+xml" href="..." />.
@relattribute could vary processing or map graphs to resultant graphs;
<semantics rel="annotation" type="application/rdf+xml" src="..." />or
<link rel="semantics annotation" type="application/rdf+xml" href="..." />could map graph data to or from an annotation ontology.
- Inferred from or processed from other document content including: document markup semantics, structural semantics, attributes such as
@epub:type, microformats and RDFa.
Documents can interface as both trees and graphs. A graph dataset could be derived from a document object model tree dataset, programmatic changes through a tree-based document object model could be reflected in graph-based data; a tree dataset could be derived from a graph dataset, changes through a graph-based API could be reflected in tree-based, document object model, data.
object elements could have a
semantics component and so too could custom elements. Web components could include a means of specifying such semantics in addition to styling and scripting. XML preprocessing can output semantic graphs including utilizing parallel markup.
Enhanced features include semantic reasoning upon graph-based data and the Web-based and desktop-based indexing, search and retrieval of such data and metadata, the data and metadata of document packages, documents, document components and multimedia. Furthermore, by expanding document object models to include document semantics, implementations of semantic selectors can be facilitated.