Copyright © 1992, 1997 International Organization for Standardization. All rights reserved.

This electronic document is for use during development and review of International Standards. Official printed copies of International Standards can be purchased from the ISO and the national standards organization of your country.

Next ClausePrevious Clause  

homeParent clauseNext major clausePrevious major clauseNext clause at this levelPrevious clause at this level


A.3 Architectural Form Definition Requirements (AFDR)

A.3.2 SGML conventions

Subclauses:


The syntax and structure of architectural forms and element types are specified rigorously using SGML markup declarations. The declarations conform to valid SGML syntax in every respect, except for two modifications to attribute definition list declaration syntax, as identified later in this annex.

NOTE 396 This practice permits the declarations to be copied for use as models when creating DTDs derived from the architecture. It also allows any DTD to serve as a meta-DTD.

NOTE 397 Although any DTD can serve as a meta-DTD, architecture definition documents (such as this International Standard) use a convention to distinguish meta-DTDs from application DTDs when both are being discussed. Declarations used to define architectures are presented with the declaration names in lower-case. Those that define application document types follow the normal SGML convention; their declaration names are presented in upper-case. Declarations that are templates (that is, they are intended to be customized and used in an application DTD) have their declaration names in mixed-case.

Some templates are actually "template forms", in that they must first be customized into templates by an architecture definition document, then customized again for use in an application DTD. These declarations are presented as templates when they are in a state that requires customization prior to use in an application DTD, but they are presented as application declarations when further customization is merely optional (that is, when they can be used as-is if the user accepts the recommended names and attribute values).

A.3.2.1 Element forms

An element form is defined by an element type declaration, optionally in conjunction with an attribute list declaration.

A.3.2.1.1 Element type declaration

The structure of an element form is defined by a "meta" content model in the element type declaration. The model is "meta" in the sense that each "element type" in the content model is really an architectural form and means "any elements conforming to this 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 document that specifies the architecture (the "architecture definition document") states whether the architecture associates any semantics with the content of an element form. If the text is silent, subelements have no special semantics in their role as content of their containing element. However, they still have their normal architectural semantics as individual elements.

NOTE 398 For example, no special HyTime semantics are defined for the content of an activity policy association rule element, but a contextual link element occurring in the content would retain its normal HyTime semantics.

As with a normal content model, a meta-model can incorporate inclusion exceptions. However, the meaning and effect are different in the two cases. In a normal content model, an inclusion means that an occurrence of an included element is transparent to its surroundings, which affects record-end handling in SGML and can have semantic consequences in architectures and applications. In a meta-model, inclusions are strictly a syntactic convenience with no implications for the included element.

Use of inclusions in an element type declaration's meta-model means that the architecture allows elements of the named forms to occur anywhere in the declared element's 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. The fact that an element type was an inclusion in the architecture does not necessarily mean it would be an appropriate inclusion in the DTD.

NOTE 399 An example of a content meta-model with an inclusion is:

<!element
   drydoc         -- Dull document element --

   - O (a|b|c)* +(x|y)
>
The construct "(a|b|c)*" is a model group while "+(x|y)" is called an "inclusion exception" in SGML. It means that the element types in parentheses can occur at any level of the element structure. In contrast, element types in the model group can occur only as "proper subelements", in the immediate content.

The omitted tag minimization parameter is primarily a suggestion to the DTD designer. It may also affect architectural processing during the creation of architectural documents by enabling the recognition of architectural elements by normal SGML markup minimization rules. (For example, architectural data in a client document may imply the start of the architectural element that contains the data in the architectural document.)

A.3.2.1.2 Meta-DTD

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 allows data. This rule includes data in the content of non-architectural elements (unless architectural processing has been suppressed for the descendants of that element as described in A.3.5.3 Architecture suppressor attribute). Otherwise, data does not affect the checking against the meta-DTD.

NOTE 400 This requirement means that architectural form definitions need not provide for the occurrence of non-architecture element types. For example, in HyTime, the following would be valid, even though the nameloc form does not include title or description subelements:

<!ELEMENT MyNameLoc
  - O (Title?,nmlist+,Desc?)
>
<!ATTLIST MyNameLoc
  HyTime   NAME     #FIXED nameloc
  ...
>

...

<mynameloc>
<title>All About Otters</title>
<nmlist>aao</>
<desc>
Locates the section on "Athletic Achievements"
</desc>
</mynameloc>

Any failure of a document instance to conform to the meta-DTD is a reportable architecture error (RAE). In particular:

  1. It is an RAE if an element occurs in a document instance at a point where its architectural form is not permitted by the meta-DTD of that form's architecture.

  2. It is an RAE if, at a point in a document instance where a meta-DTD requires data or an instance of a particular architectural form, the required object fails to occur.

  3. It is an RAE if the value of an architectural attribute does not satisfy its declared value.

An architecture does not constrain the construction of document type definitions, only document instances. For example, any document's DTD can declare HyTime as a base architecture, as long as its document instance conforms to HyTime.

NOTE 401 A validating architecture engine can optionally report DTD constructs (such as poorly designed content models) that would prevent the creation of a valid conforming instance, or that would allow the creation of a nonconforming instance.

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 A.3.4 Architecture support declarations) there will be a single meta-DTD that permits only the optional facilities supported by that system. Moreover, the actual meta-DTD applicable to a given document could be more restrictive than either of those, depending on the facilities required by that document (see A.3.6.1 Architectural document element). The constraints of a more restrictive meta-DTD that is required by a document's architecture support declarations can also be enforced by the document's DTD.

NOTE 402 The declared content or content model of an application's element type can differ from the meta-model of the architectural form as long as it allows instances that conform to the architectural form meta-model. For example, a meta-model might be "(a|b|c)". An application designer could legally exclude the possibility of "c" by using the content model "(a|b)". The content model "(a|x)" could also be used. In that case, if "x" is not architectural (it is not derived from any form in the architecture or is not taken to be architectural) it would not be an architectural error for "x" to occur (because non-architectural elements are simply ignored for the purpose of validation against an architectural meta-DTD). If "x" is architectural, it would be an RAE.

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 definition document. They can be used in conjunction with marked sections for automatic tailoring in conjunction with the ArcOptSA attribute (see A.3.5 Architecture control attributes). They can also serve to document relationships among the architectural forms, but otherwise have no semantic significance.

The meta-DTD of a derived enabling 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.

A.3.2.1.3 Attribute definition list declaration

An architectural element type's attribute definition list in an application DTD includes the ArcForm attribute, which identifies the architectural form. The ArcForm attribute is unique in that it must be defined for every element type whose instances are to be processed in a manner defined by the architecture (unless architectural markup minimization is used, as described in A.3.6.2 Architectural markup minimization).

NOTE 403 Normally, every element of the same type has the same architectural form, which allows the ArcForm value to be fixed in the DTD. However, this is not a requirement: an element type definition, could, for example, allow its instances to be one of a choice of architectural forms.

The other attribute definitions follow the conventions described in A.3.2.3 Attribute list conventions.

A.3.2.2 Attribute forms

An attribute form defines attributes that can be used in the attribute definition lists of element types conforming to one or more element forms, including SGML processing link attribute lists. The element forms with which the attributes can be used are indicated by declaring their names as associated element types.

In a meta-DTD, unlike a normal DTD, there can be more than one attribute definition list declaration associated with the same element type. Moreover, if the associated element type is specified as the reserved name "#ALL", the attributes can be used with any of the architecture's element forms. (Such attributes are known as "common attributes".) These two facilities are part of the "AFDR meta-DTD notation" extensions and can be used only in a meta-DTD.

It is not an error if the same attribute name occurs in more than one such declaration, but later definitions of the same attribute name for the same associated element type have no effect. The order in which the declarations are parsed governs, except that common attribute declarations are considered to follow all the other attribute definition list declarations.

NOTE 404 As SGML requires that an attribute name be unique in its attribute list, designers should make sure that a common attribute -- which could occur in all attribute lists -- has a name that is different from all other attribute names in the architecture.

NOTE 405 In an application DTD, "#ALL" cannot be specified as SGML does not allow it. Nor can more than one attribute definition list declaration be associated with the same element type.

An attribute form can also be defined for use with notation forms by specifying their names as associated notation names in the attribute definition list declaration. In meta-DTDs, the same extensions are available for these as for associated element types. The same rules regarding common data attributes can be used with all of the architecture's data attribute forms.

A.3.2.3 Attribute list conventions

All architectural attributes, whether part of an element form or an attribute form, are specified using the conventions in this sub-clause.

NOTE 406 For a given element or notation form, an application can replace an attribute's architecture-defined name by using the "ArcNames" attribute (see A.3.4.2 Architecture support attributes).

It is a reportable architecture error if a document instance contains a value for an attribute that fails to satisfy the declared value defined for it in the meta-DTD.

NOTE 407 As an attribute value must satisfy an attribute definition in both the meta-DTD and the client DTD, there is a possibility for a conflict of concrete syntaxes. For this reason, it is recommended that the concrete syntax of a meta-DTD be designed for use with all expected client documents. The broader the potential use, the closer the concrete syntax (and particularly its name spelling rules) should be to the reference concrete syntax (or the usual concrete syntax of the expected user community, if different).

A.3.2.3.1 Default value prescription

An architecture's attributes are categorized as being "mandatory" or "non-mandatory", and also as being "constant" or "variable", as follows:

  1. Non-mandatory attributes

    These attributes may be defined in the application DTD, but need not be. If an attribute is not defined in the client DTD, the architecture either provides a default value either as part of the attribute definition in the architecture meta-DTD, or, in the case of an impliable or content reference attribute, documents the default behavior as part of the architecture definition document. The non-mandatory status of an attribute is documented in the default value prescription of the attribute definition by the presence of "#IMPLIED", "#CONREF", or a literal (possibly fixed) default value.

    If a non-mandatory attribute is not defined, or a defined impliable attribute has no default value and is not specified on the start-tag, the architectural semantic processor uses the default value documented in the architecture definition document.

    NOTE 408 An application can conveniently specify the defaulting of impliable attributes by using the default value list facility of the General Architecture (see A.5.6 Default value list).

  2. Mandatory attributes

    These attributes must be defined in the application DTD and values must be provided by the application, either by defaulting or by an attribute specification. The mandatory status of an attribute is documented in the default value prescription of the attribute definition by the presence of "#REQUIRED".

    When an architecture definition document modularizes an architecture, an optional facility could have attributes that are mandatory with respect to that facility. The meta-DTD used by a client document must contain all the declarations that are required by the facilities used by the document. It need not contain declarations that are required by optional facilities that are not used.

  3. Constant attributes

    The default value prescription of an architectural attribute may be the token "#FIXED" followed by a default value specification; this denotes a constant attribute whose value must always be equal to its default.

    NOTE 409 If an attribute is fixed in the meta-DTD, an application should not declare it at all; this ensures that it will always be assigned its default value. Alternatively, it may be declared as a fixed attribute with a default value identical to the architectural default value.

  4. Variable attributes

    An attribute that is not a fixed attribute is a variable attribute.

    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.

    NOTE 410 Some attributes defined in the HyTime architecture are variable with respect to their associated element forms, but are required to be constant with respect to client element types. See 5 Notation for details.

NOTE 411 The following list gives examples of the forms of declared value and default value prescriptions used to document each combination of attribute categories:

  1. Mandatory

                NAMES     #REQUIRED

  2. Non-mandatory/constant

                NOTATION  #FIXED SDQL

  3. Non-mandatory/variable

                NUMBER    #IMPLIED
                NAME      #CONREF
                NAMES     novamp
                (order|disorder) order
                CDATA     ""

A.3.2.4 Processing link attributes

SGML processing link attribute lists can be used to specify both architectural attributes and architecture control attributes for base architectures declared in the source document DTD. When an element has both a link attribute and an SGML source element attribute with the same name, only the link attribute will be considered for architectural processing, with the exception of the "ArcNames" architecture control attribute (see A.3.5.2 Architectural attribute renamer).

Next ClausePrevious Clause  

Copyright © 1992, 1997 International Organization for Standardization. All rights reserved.

This electronic document is for use during development and review of International Standards. Official printed copies of International Standards can be purchased from the ISO and the national standards organization of your country.


HTML generated from the original SGML source using a DSSSL style specification and the SGML output back-end of the JADE DSSSL engine.