Semantics are similar to XLink, but simpler and only a subset is implemented.
This is intended to make the instances easy to create and read, and software
relatively easy to implement. The architecture is:
- A single element (link) used for all linking purposes.
- The link types are determined by the type attribute and can be:.
- locator. This points to a single target and must carry either a ref or href attribute.
locator links are usually children of an extended link.
- arc. This is a 1:1 link with both ends (from and to) defined.
- extended. This is usually a parent of several locator links and serves
to create a grouping of link ends (i.e. a list of references in documents).
Many-many links can be built up from arcs linking extended elements
All links can have optional role attributes. The semantics of this are not defined;
you are encouraged to use a URI as described in the XLink specification.
There are two address spaces:
- The href attribute on locators behaves in the same way as href in
HTML and is of type xsd:anyURI. Its primary use is to use XPointer to reference
elements outside the document.
- The ref attribute on locators and the from and to
attributes on arcs refer to IDs (without the '#' syntax).
Note: several other specific linking mechanisms are defined elsewhere in STM. relatedEntry should be used in dictionaries, and dictRef
should be used to link to dictionaries. There are no required uses of link in STMML
but we have used it to map atoms, electrons and bonds in reactions in CML
Relation to XLink.
At present (2002) we are not aware of generic XLink
processors from which we would benefit, so the complete implementation brings little
extra value.
Among the simplifications from Xlink are:
- type supports only extended, locator and arc
- label is not supported and ids are used as targets of links.
- show and actuate are not supported.
- xlink:title is not supported (all STM elements can have a title
attribute).
- xlink:role supports any string (i.e. does not have to be a namespaced resource).
This mechanism can, of course, still be used and we shall promote it where STM
benefits from it
- The to and from attributes point to IDs rather than labels
- The xlink namespace is not used
- It is not intended to create independent linkbases, although some collections of
links may have this property and stand outside the documents they link to