There are two kinds of system identifier: formal system identifiers and simple system identifiers. A system identifier that does not start with < will always be interpreted as a simple system identifier. A simple system identifier will always be interpreted either as a filename or as a URL.
Formal system identifiers are based on the System Identifier facility defined in "ISO/IEC 10744 (HyTime) Technical Corrigendum 1'', Annex D. A system identifier that is a formal system identifier consists of a sequence of one or more storage object specifications. The objects specified by the storage object specifications are concatenated to form the entity. A storage object specification consists of an SGML start-tag in the reference concrete syntax followed by character data content. The generic identifier of the start-tag is the name of a storage manager. The content is a storage object identifier which identifies the storage object in a manner dependent on the storage manager. The start-tag can also specify attributes giving additional information about the storage object. Numeric character references are recognized in storage object identifiers and attribute value literals in the start-tag. Record ends are ignored in the storage object identifier as with SGML. A system identifier will be interpreted as a formal system identifier if it starts with a < followed by a storage manager name, followed by either > or white-space; otherwise it will be interpreted as a simple system identifier. A storage object identifier extends until the end of the system identifier or until the first occurrence of < followed by a storage manager name, followed by either > or white-space.
The following storage managers are available:
The storage object identifier is a filename. If the filename is relative it is resolved using a base filename. Normally the base filename is the name of the file in which the storage object identifier was specified, but this can be changed using the base attribute. The filename will be searched for first in the directory of the base filename. If it is not found there, then it will be searched for in the list of directories specified by the environment variable SGML_SEARCH_PATH. The list is separated by colons under Unix and by semi-colons under Windows.
The storage object identifier is an integer specifying a file descriptor. Thus a system identifier of <osfd>0 will refer to the standard input.
The storage object specifier is a Tcl channel identifier that refers to an open channel. Thus a system identifier like <channel>file4 will refer to the channel that has been previously opened and returned the channel identifier file4. The channel has to be registered in the same Tcl interpreter that owns the SGML widget.
The storage object specifier is a Tcl command that is called repeatedly to retrieve the storage object. The command must return a non-empty string on each invocation or an empty string when the complete storage object has been delivered to the SGML widget. After an empty string has been returned, the SGML widget will assume that the complete storage object has been read and will not call the command again.
On output, the Tcl command will be called repeatedly with a single string argument that should be stored by the command. The last invocation of the command (after the complete storage object has been transferred) will receive an empty string so that the Tcl command can perform cleanup operations, close open files, etc.
On output, no byte order mark is prepended and no data encoding is performed by the SGML widget. The arguments are passed as Tcl strings in UTF-8 format.
The storage object identifier is a URL. Only the http scheme is currently supported and not on all systems.
The storage manager is the storage manager of storage object in which the system identifier was specified (the underlying storage manager). However if the underlying storage manager does not support named storage objects (i.e. it is osfd), then the storage manager will be osfile. The storage object identifier is treated as a relative, hierarchical name separated by slashes / and will be transformed as appropriate for the underlying storage manager.
The bit combinations of the storage object identifier are the contents of the storage object.
In addition, user-defined storage managers can be used to extend the range of possible storage objects. Please refer to the documentation of the TkSGML library for additional details.
Attributes can be provided within the start tag that specifies the storage manager. Please refer to the documentation of the TkSGML library for additional details.
A simple system identifier is interpreted as a storage object identifier with a storage manager that depends on where the system identifier was specified: if it was specified in a storage object whose storage manager was url or if the system identifier looks like an absolute URL in a supported scheme, the storage manager will be url; otherwise the storage manager will be osfile. The storage manager attributes are defaulted as for a formal system identifier. Numeric character references are not recognized in simple system identifiers.