This annex states the requirements for the formal definition of the
architectural forms by which an enabling document architecture governs
the SGML representation of its documents.
A document architecture, as that term is defined in ISO 8879, can be "encompassing", governing every aspect of its documents' representation and processing. The document representation requirements for an encompassing architecture are expressed formally -- at least insofar as SGML is capable of expressing them -- in a document type definition (DTD).
A document architecture can also be "enabling", in which case it does not specify complete document types. Instead, an enabling architecture defines rules, known as "architectural forms", that application designers can apply in their document type definitions. The set of architectural forms and related declarations for an enabling architecture comprises a "meta-DTD".
Architectural forms are rules for creating and processing elements (just as document architectures are rules for creating and processing documents). Architectural forms are specified principally by attribute definitions, one of which is the "ArcForm" attribute, whose value identifies the form. However, an architectural form can also include rules for constructing the content models of element types conforming to the form.
There are two kinds of architectural form:
An element type that conforms to an element type form defined by, say, the "ArcName" architecture, is informally called an "ArcName element type", even though the element type itself is not defined by the ArcName architecture, but by an application. An instance of such an ArcName element type is called an "ArcName element". An element, notation, data string, or attribute that does not conform to an architectural form is termed "non-architectural".
An application DTD can include element types of different enabling architectures, element types that conform to no formally-defined architecture (other than the encompassing architecture of the DTD itself), and element types that conform to several enabling architectures at once. Where multiple architectures govern a document, the rules of each are enforced without regard to objects that are non-architectural with respect to it.
An element cannot conform to more than one element type form of a given architecture. It can, however, conform to multiple attribute list forms unless prohibited by the rules of the particular architecture.
The architectures that govern a DTD are called its "base" architectures and the DTD is their client. An architecture can itself be governed by one or more base architectures; it is termed a "derived" architecture.
The syntax and structure of architectural forms and element
types are specified rigorously using SGML markup declarations. The
declarations include comments, called "conventional comments", that
follow conventions established in this sub-clause to specify
architectural constructs and constraints that are enforced by an
architecture implementation (called an "engine") and an SGML
parser. The declarations conform to valid SGML syntax
in every respect.
Declarations that define architectural forms are presented with the
declaration names in lower-case. Those that define element types
(that is, not element type forms) follow the normal SGML convention;
their declaration names are presented in upper-case.
An element type form is defined by an element type declaration in conjunction with an attribute list declaration.
The structure of an element type form is defined by a "meta" content model in the element type declaration. The model is "meta" in the sense that its "element types" are really architectural forms and mean "any element conforming to that form". An application DTD could therefore define several element types conforming to a given architectural form. Moreover, each could have a different content model as long as it allowed content that satisfies the meta-model.
The text of the architecture definition document states whether
the architecture associates any semantics with the content of an
element type form. If the text
is silent, the elements have no special semantics in their role as
content of their containing element. However, they still have their
normal architectural semantics as individual elements.
As with a normal content model, a meta-model can incorporate
inclusion exceptions. Use of inclusions in this way means that
elements of the named forms can occur anywhere in the content in the
document instance, including the content of subordinate elements.
The application designer can choose, in his DTD, to require the
elements to be proper subelements, inclusions, or both.
Character data content can be further qualified (beyond the normal SGML
tokens) by means of the "HyLex" notation and "reftype" conventional
comments, which are described in connection with their use in
documenting attribute values in
The set of declarations defined in an architecture definition
collectively represent a meta-DTD. The occurrence of an architectural
object in a document instance is checked against the meta-DTD to see
if it is allowed. Other objects are not checked. Data is considered
architectural only when it occurs at a point where the meta-DTD
requires data; otherwise it does not affect the checking against the
meta-DTD.
Any failure of a document instance to conform to the meta-DTD is a
reportable architecture error (RAE). In particular:
An application DTD can impose constraints on the meta-DTD by
prohibiting the occurrence of some architectural forms in specific
contexts.
An architecture does not constrain the construction of document type
definitions, only document instances. For example, any valid document
type definition can declare HyTime as a base architecture, as long as
its document instance conforms to HyTime.
A meta-DTD is flexible and does not necessarily clarify all
issues of contextual relevance; some elements may be
meaningful only in the context of other elements from
which they are referenced, or only as resources for the
processing of other elements.
The meta-DTD comprising all of the SGML definitions of an architecture
necessarily includes all of the architecture's optional facilities (if
any). In contrast, for any given architecture implementation's system
declaration (see
As with normal DTDs, parameter entities can be used in the
construction of meta-DTDs. The parameter entity declarations are
primarily an aid for tailoring the meta-DTD to correspond to any
modularization of facilities supported by the architecture. They also
serve to document relationships among the architectural forms, but
otherwise have no semantic significance.
The meta-DTD of a derived architecture is a "derived meta-DTD". The
meta-DTDs of its base architectures are its "base meta-DTDs". The
meta-DTDs of base architectures of application DTDs are the
application's base meta-DTDs.
An element type form's attribute definition
list includes the mandatory ArcForm attribute, which identifies the
architectural
form. The ArcForm attribute is unique in that it must be defined
for every element type that is to be processed in a manner defined by
the
architecture (i.e., that has attributes defined by the architecture).
The other attribute definitions follow the conventions described in
The specification of an element type form's attribute list can include
common attributes (explained below) or non-architecture-specific SGML
attribute types (such as ID and NOTATION) when they are required for
the element type, or when they are important enough to the element
type to warrant the emphasis. For example, in HyTime, the ID
attribute is included for a form if there are HyTime elements that are
required to reference instances of that form.
The attribute definition list for an element type form can
incorporate by reference attributes defined in attribute
list forms. An attribute list form is referenced by including
its name
in a conventional comment in the attribute definition list
declaration. The comment consists of the word "Attributes:" followed by
the name of the attribute list form.
An attribute list form defines attributes that can be used in the
attribute definition lists of element types conforming to one or more
element
type forms, including SGML processing link attribute lists. The
element types with
which the attributes can be used are indicated in the following manner:
Attribute list forms can also be defined for use with data
content notations ("data attribute forms"). They differ from other
attribute list forms in that they include an ArcForm attribute to
identify the notation form. The notations with which data attribute
forms
can be used are identified by the same conventions employed for
element attributes. Common data attributes can be used with all of the
architecture's notations.
All attributes but the ArcForm attribute, whether part of an element
type form or an attribute list form, are specified using
the conventions in this sub-clause.
An SGML attribute definition parameter consists of an attribute name,
a declared value prescription, and a default value
prescription. The components of the definition can be separated by
comments, as can the individual definitions in a declaration.
Lexical types of attributes (and data content) defined by an
architecture are
specified by conventional comments containing the word "lextype" or
"ulextype", followed by a lexical model in the "HyTime lexical model notation"
(HyLex) (see
Semantic constraints on the value of an attribute are defined in a
conventional comment beginning with the word "Constraints:". Either
the comment is self-explanatory, and/or there is sufficient
additional information in the accompanying text of the architecture
definition document to explain the constraint.
Declared value prescriptions that require ID references are specified
with either the SGML IDREF or IDREFS keywords, or with ID
references indicated by a lextype conventional comment.
If the attribute definition contains a
conventional comment containing the word "reftype" followed by an SGML
OR group, the target of the ID references must be an element that
conforms to an element type form whose name
occurs in the OR group. Note that the OR group is meta: the names are
architectural forms rather than element types.
An application DTD can use any declared value prescription whose values
could satisfy the declared value prescription in the architecture
definition.
It is a reportable architecture error if a document instance
contains a value for an attribute that fails to satisfy the declared
value prescription defined for it in the architecture definition
document.
An architecture's attributes are categorized as being "mandatory" or
"non-mandatory", and also as being "fixed" or "variable", as follows:
These attributes may be defined in the application DTD, but need not be. If
they are not, the architecture provides a value for them. That value
is
documented either in the default value prescription of the attribute
definition, or in a conventional comment that begins with "Default:".
These attributes must be defined in the application DTD and
values must be provided by the application, either by defaulting or by
specification on the start-tag. The mandatory status of an attribute
is documented in the default value prescription of the attribute
definition by the presence of "#REQUIRED", "#CURRENT",
or the string "Mandatry".
If the default value prescription contains the keyword
"#FIXED", it signifies that the attribute is a fixed attribute;
that is, the attribute must have the same value for all
elements of a given element type.
An attribute that is not a fixed attribute is a variable attribute,
indicated by the absence of the "#FIXED" keyword in the default value
prescription.
In an application DTD, the default value prescription
for a variable attribute, whether mandatory or not, can use any
keyword or attribute value specification allowed by SGML. The form
used to document the attribute in the architecture definition is
irrelevant, except that:
A document indicates conformance to architectures by
using the APPINFO parameter of the SGML declaration and the
other facilities described in this sub-clause.
Conformance of a document to one or more architectures defined in
accordance with these requirements is indicated by specifying the
keyword "ArcBase" as a sub-parameter of the APPINFO parameter of the
SGML declaration. The keyword indicates the potential presence in one
or more DTDs of an architecture base (ArcBase) declaration that
identifies the "architecture support declarations" for the
architectures on which the DTD is based.
The format of the sub-parameter is:
An ArcBase declaration identifies one or more base architectures of a
DTD or a derived meta-DTD. It cannot be used in a meta-DTD that is not
derived. It should precede the architecture support declarations
pertaining to the base architectures that it identifies.
There can be more than one ArcBase declaration in a DTD or meta-DTD.
Syntactically, the ArcBase declaration is a processing instruction
(PI), not an SGML markup declaration. In the template below, it is
shown in the reference concrete syntax. In use, the ArcName-list
parameter must be replaced by one or more architecture names (ArcName)
declared as notation names, separated by SGML
The declaration name is the initial character string, up to the first
ts separator. The name is always "ArcBase" in meta-DTDs. It should
also be "ArcBase" in DTDs, but provision is made for changing it in
the APPINFO parameter of the SGML declaration, if necessary, to avoid
the (admittedly unlikely) possibility of conflicts when retro-fitting
an architecture to a document that already has PIs that begin with
"ArcBase ".
A DTD contains architecture support declarations for each architecture
on which its instances are based. They consist of a notation
declaration that identifies the architecture definition
document and a general entity declaration that identifies the meta-DTD.
Associated with the notation declaration is an attribute definition
list declaration for "architecture support attributes".
To the extent permitted by SGML, architecture support declarations
should precede other declarations.
.****
Each base architecture name (ArcName) specified in an
ArcBase declaration must be declared as a notation name in a notation
declaration that identifies the architecture definition
document.
The template for such a declaration is shown below. In use, ArcName is
replaced by the actual notation name for the architecture, as
specified in the ArcBase declaration. The conformance statement shows
that the architecture claims conformance to the requirements of this
annex. (It does not indicate conformance to HyTime.)
There must be an attribute definition list declaration for each
architecture notation declaration to define mandatory architecture
support attributes. An individual architecture can define additional
architecture support attributes of its own.
The template for such a declaration is shown below. In use, ArcName is
replaced by the actual notation name for the architecture. The
architecture designer can also add application-defined attribute
definitions.
The attribute
The attribute
The attribute
The attribute
The attribute
The attribute
The attribute
It is an error if a document requires an architecture
facility that is not identified in the support declarations, but a
system is not required to report such an error as it may not be able
to do so.
However, it is not an RAE if the declarations identify facilities that
are not actually required by the document.
If a system attempts to process a document whose
support declarations identify facilities that
the system does not support (see
Identification of a
facility implies automatic identification of any facilities on which
it is dependent.
The DerArc support attributes, for use in derived architecture
definitions, are described in
Each base architecture name (ArcName) specified in
an ArcBase declaration must be declared as an
entity name in an entity declaration that identifies an architecture
meta-DTD to which the document instance conforms. The entity must be
declared as CDATA with the ArcName specified as the NOTATION. It can
have an attribute specification list for architecture-defined support
attributes.
The template for such a declaration is shown below. In use, ArcName is
replaced by the actual notation name for the architecture. The
sample attribute specification list is replaced by specifications of
architecture-defined attributes.
If the architecture has facility attributes, it is not an error if
they are more or less restrictive than the meta-DTD. The document
instance must conform to both.
No entity reference
is specified for the architecture entity as it is only
accessed directly by the architecture engine (if at all), outside the
parsing context of the document. However, the entity must conform to
the SGML declaration that is named by the ArcSGML
attribute. If none is named, the SGML declaration applicable to the
architecture entity declaration itself is used.
It is possible (though not required) for meta-DTDs to be processable
by a universal "architectural form engine". Such an engine behaves
similarly to an SGML parser validating conformance to a DTD, except
that:
The attribute
The actual name of the
attribute should not be ArcForm; it must be unique for each base
architecture and should ideally be unique among all the attribute
names in client documents. The actual name is specified
by the ArcFormA attribute of the architecture notation declaration.
An architecture must declare the ArcForm attribute for each element
type form and notation form that it defines.
The document element of a DTD, or the document
element type form of a derived meta-DTD must conform to, and each base
architecture must provide,
the element type form
The ArcDoc form allows an architecture to define
attributes for the document element, and to specify the "architectural
context-free content" (ArcCFC). The ArcCFC is the set
of element type forms that can occur independently at the highest
level of a document.
The actual name of the architectural form
need not be ArcDoc; it could reflect the name of the
architecture. The actual name is specified
by the ArcDocF attribute of the architecture notation declaration.
A template for declaring a document element type form is shown below.
In use, ArcDoc
is replaced by its actual name and a name other than ArcCFC could be
used for the content entity. The architecture designer could add the
architecture's own attribute definitions for the document element.
The attribute list form
The attribute
The common attribute
The attribute
The attribute
An architecture can be derived from one or more base architectures by
the same means that a DTD is derived from one or more base
architectures. That is, an ArcBase declaration and support
declarations for the specified base architectures are present in the
meta-DTD. A derived architecture can also serve as a base architecture
for DTDs and for other derived architectures.
In the meta-DTD of a derived architecture, the attribute list form
The attribute
It is an RAE to specify an object for copying explicitly if an
object of that type is declared with the same name in the
derived architecture.
It is an RAE to specify identically named objects of the same type for
copying explicitly or automatically from two or more base architectures.
Objects that these requirements cause to exist automatically in all
architectures (such as all-architecture common attributes) are never
copied. It is an RAE to specify them for copying.
To eliminate name conflicts, the
attribute
An architecture that conforms to these Architectural Form Definition
Requirements shall so indicate by including the following statement in
its architecture definition document and in its meta-DTDs:
DTDs and meta-DTDs derived from a conforming architecture should
include the statement in the architecture support notation
declaration.
Meta-DTD
Attribute list declaration
Attribute list forms
Attribute list conventions
Attribute definition
Declared value prescription
Default value prescription
Identification facilities
APPINFO parameter of SGML declaration
Architecture base declaration
Architecture support declarations
Architecture notation declaration
Architecture support attributes
Architecture entity declaration
The semantics of the "constraints" conventional comment is
supported by the individual architecture implementation, as are
"lextype" and "reftype" if they are not processed by the architectural
form engine.
Architectural form attribute
Architectural document element
All-architecture common attributes
Derived architectures
Conformance