Many SGML applications face the problem of understanding the semantics that should be attached to elements in any arbitrary DTD.
Architectural forms are actually implemented via standard SGML attributes that are added to the DTD. In most cases, these are defined using the #FIXED keyword, setting a specific attribute value for all instances of the element in all documents.
An application may need to know about "title objects" within the documents. Of course, in any specific DTD, the choices of a Generic Identifier for a title object are limitless. It could be called head, h1, title, ti, and so on. To allow the application to identify these title objects, we'll use a specialized attribute called APPTYPE. So, for example, if our specific element is named head:
<!ELEMENT HEAD - - (#PCDATA) > <!ATTLIST HEAD APPTYPE NAME #FIXED "TITLE">
As the application is processing a document, every instance of the element HEAD will have associated with it an attribute named APPTYPE with the value TITLE. The application can recognize this and process the element as it would any title.
For architectural forms that take data values, a simple functional language provides a mechanism to assemble combinations of element content, attribute values, and literals.
<!ENTITY % commonatts
'Id ID #IMPLIED
%OLIAS.ID; "attr( Id )"'>
<!ELEMENT Sect1 - - (Title, TitleAbbrev?, (RefEntry+ | Sect2+)) >
<!ATTLIST Sect1
%commonatts;
%OLIAS.Section; >
<!ELEMENT Title - - ((%inlinechar.gp;)+) >
<!ATTLIST Title
%commonatts;
%OLIAS.Title; "#CONTENT" >
<!ELEMENT Graphic - - CDATA>
<!ATTLIST Graphic
Entityref ENTITY #IMPLIED
Fileref CDATA #IMPLIED
Id ID #IMPLIED
%OLIAS.Graphic; "firstof(attr(Entityref),attr(Fileref))"
%OLIAS.ID; "attr( Id )" >
<!ELEMENT Link - - ((%inlinechar.gp;)+) >
<!ATTLIST Link
Linkend IDREF #REQUIRED
%OLIAS.IDREF; "attr( Linkend )" >
<!ELEMENT RefEntry - - (DocInfo?, RefMeta?, RefSect1+) >
<!ATTLIST RefEntry
%commonatts;
%OLIAS.Section;
%OLIAS.Title "firstof(RefMeta,'Reference Section')" >
<!ELEMENT RefMeta - - (RefEntryTitle, ManVolNum? ) >
<!ATTLIST RefMeta
%commonatts;
%OLIAS.Value; "concat( RefEntryTitle, ManVolNum )" >