Previous Table of Contents Next


Architectural Templates (Forms)

HyTime uses templates (or forms) that attach extra information to elements. You use these forms to attach attributes to an element without changing the DTD or the parsing for the document instance. This way, you can swap documents and data even with different DTDs and different tags. If you can use forms, you can attach many types of attributes at different times. The forms and their targeted elements can have a dynamic relationship, which greatly expands your ability to make hypermedia links.

The basic types of architectural templates or forms include:

  Attribute list forms. These forms look like regular SGML attribute lists, but they are added to a DTD’s attribute lists. One attribute identifies the architectural form; the other attributes identify values.
  Element type forms. These forms require an element declaration and an attribute list.
  Location address forms. These forms identify a specific location by path, name, coordinate, and so on.
  Object forms. These forms are used for anything in a HyTime event. A HyTime event is a specialized term; it signals the occurrence of an object.
  Resource forms. These forms specify what is permitted in a HyTime event.

There are more types of forms. They all, however, add linking capability to DTDs and documents and make it easier to launch links.


Note:  
Generic SGML linking has some drawbacks. You can only link to and from whole documents—unless you use a unique ID to each linkpoint.

HyTime extends SGML’s ability to make links to places that do not have an ID to each linkpoint. It uses the pointer or address forms mentioned above. The forms add the ID information or provide enough data to locate the desired object. HyTime creates a local ID, or it uses the link itself to find the object. For example, when you say, “I want the wrench on the bench,” HyTime can determine which bench you mean and find the wrench on it.


HyTime Requirements

To work in your environment, HyTime requires three component pieces:

  A HyTime application. This provides the user interface and controls external programs and how multimedia events are displayed.
  A HyTime engine. This helps the application talk with the parser. It builds links and controls synchronization between external programs and the application.
  An SGML parser. This validates DTDs and document instances and updates the HyTime engine with that information.

HyTime is an extension of SGML. Therefore, you handle declarations, comments, and the like in HyTime just as you do in SGML. For example, you use standard SGML declarations to specify HyTime architectural forms and element types. The HyTime declaration looks slightly different, however. It shows up as an SGML processing instruction, as in:

     <?HyTime DECLARATION PARAMETERS>

A DTD can contain both HyTime and other elements, and the architectural forms say where each one can occur. The only constraint in HyTime is in how you put together document instances—not DTDs.


Note:  
You can read about the HyTime specification at http://www.sil.org/sgml/gen-apps.html#hytime. There are more links, but the sil.org site is a good one. You can do a Web search for HyTime resources. There are plenty. A copy of the HyTime specification costs approximately $100.

Upgrading Your HTML Site to an SGML Site

You should consider upgrading your Web site from HTML to full-blown SGML, which offers more functionality. With SGML Web browsers such as SoftQuad’s Panorama arriving on the scene, you can provide your Net guests with more than you can with just HTML. The main advantage is the diversity of document types that you can make available. HTML is just one application of SGML; many other document types have been written.

For example, it would be difficult to put an entire set of software manuals in HTML for your clients. Many companies put their software manuals on CD-ROM instead of hard copy. If you write your software manuals in SGML, you can place them online. Your customers then can access the most recent versions as if the files were on their own local CD-ROM.


• See “What SGML Can Add to Web Sites,” p. 301

• See “SGML on the Web,” p. 311

• See “Challenges of Upgrading” and “Benefits of Upgrading,” pp. 337, 339

• See “How To Make Effective SGML Web Pages,” p. 389

• See “Current Collaborative Projects on the Web,” p. 519


If you are committed to writing only simple HTML documents, don’t worry about upgrading. The world of SGML has an enormous number of documents, however. The advantages include:

  HyTime multimedia links
  More DTDs, which add functionality to your links, such as TEI (P3), Euromath, DocBook, AAP, and even ICAD
  More ways of handling special situations or circumstances
  More powerful features for your Web site, such as the ones that big businesses and governments use in their documents

From Here…

You have finished learning about document analysis. You have been introduced to DTDs, which you’ll learn even more about in the following chapters on DTDs and content modeling.

Document architecture is a simple idea, but it is often a complicated practice. Extending architecture can be even more complicated. It boils down to adding features to your documents. You now know the basic way to add features. You will learn the syntax for those features later.

For more information, refer to the following:

  Part III, “Content Modeling: Developing the DTD,” discusses DTDs in detail.
  Part IV, “Markup Strategies,” deals with special situations. You’ll learn how to avoid having to mark up existing documents manually.
  Part V, “SGML and the World Wide Web,” is a must if you’re interested in the World Wide Web.
  Chapter 25, “Handling Specialized Content and Delivery,” discusses much of the material in this chapter in greater detail.


Previous Table of Contents Next