Previous Table of Contents Next


Stilo

Stilo, a program being developed by Stilo Associates in the United Kingdom, provides another editing option for SGML on the Mac. It has some promising features. Like Author/Editor, Stilo is fundamentally oriented to structural editing—it rigorously enforces the DTD. It comes with many already compiled DTDs. It uses its own compiled document and DTD formats for editing; SGML export is the final stage of the editing process.

Unlike Author/Editor, however, the DTD compiler is built into the basic Stilo editor. This promises to make Stilo a more economical solution than Author/Editor, particularly for those who need to change or customize DTDs in their projects. Stilo’s editing model is oriented to data entry, rather than document conversion. Stilo allows for a DTD to be saved by itself, or in conjunction with a template document containing text and markup to be automatically entered into new documents.


• See “Entities: Their Use and the ENTITY Markup Declaration,” p. 184

Another feature of Stilo that is not in Author/Editor is support for SGML external entities. A single Stilo file can be split across multiple files. This feature enables you to split large documents for separate editing, which makes document management and collaboration in groups much easier. It also makes reusing common material much easier, by enabling it to be shared among documents. The export to SGML command preserves these entity divisions. It produces SGML in separate files that refer to one another by using SGML’s standard entity declarations and references. A simple list dialog box enables you to define new external entities for a particular document or in a DTD file. That way, you can use entities for managing standard document types, as well as in individual documents.

Stilo also provides a graphical viewer on the Mac for the DTD itself, as shown in figure 27.5. This view represents the parts of the DTD as nested boxes; each box represents an element. Display this graphical view while you edit a document. By highlighting the current element, it provides visual information on the structure of the document. As you change position in the document, the relevant portion of the DTD is always displayed, indicating what options for data entry and structuring are available.


Fig. 27.5  A view of the pre-release Stilo editor and its DTD viewer.

You can use this view to get an overview of the whole DTD. Because the key relationships among the elements of a DTD are not represented in the visual structure of its definition, graphical tools like this one are invaluable. They make the structure of complex DTDs much more accessible.

Stilo Associates
Empire House
Mount Stuart, Cardiff
CF1 6DN, UK
(44) 1222-483-530
info@stilo.demon.co.uk
http://www.demon.co.uk/stilo

Qued/M, Alpha, and BBEdit

If you do not have access to—or cannot afford—the commercial products for authoring SGML on the Mac, you might be able to use an ASCII programmer’s editor to tag or convert your SGML. These editors do not offer special SGML support if you enter a document from scratch, but they speed up the process of converting OCR files and files that were saved in RTF or other word processor conversion formats.

These editors support powerful find and change commands that use text patterns called regular expressions. Qued/M, a commercial editor made by Nisus Software, enables you to save regular expressions as macros. You can build a library of simple conversion patterns that apply to the formats of your documents.

Alpha is a shareware programmer’s editor. It handles standard regular expressions. It has a powerful HTML mode that you can—with perseverance—extend to handle simple SGML. In HTML mode, anything within angle brackets is highlighted in blue, which makes it easy to separate tags from text. You can automate sequences of change commands in Alpha, but you must be prepared to deal with its textual programming interface. Alpha has the most complete and easily programmable scripting facilities of these three products.

BBEdit exists in both shareware and commercial forms. It is the most popular ASCII editor for the Mac. It has several HTML modes. They are not as easily extensible as Alpha’s because they are implemented as binary plug-ins rather than as macros. BBEdit handles regular expressions. The HTML modes in both BBEdit and Alpha do not know how to validate tags, and they cannot prevent you from placing them incorrectly. All they do is automate the typing involved in tagging a document.

One of these editors, or something similar, is an essential tool if you’re going to convert much existing electronic text. The more you work with one-of-a-kind formats—which make automatic conversions impossible—the more this is likely to be true. If you use an editor that is not SGML-aware—such as this one—you also need to run an SGML validator on your converted and tagged documents to make sure that your SGML has no errors.

Qued/M
Nisus Software Inc
PO Box 1300
Solana Beach, CA 92075
(800) 922-2993 or (619) 481-1477
(619) 481-6154 FAX
http://www.nisus-soft.com/product_info.html#QUEDM
BBEdit and BBEdit Lite (shareware)
Bare Bones Software
http://www.tiac.net/biz/bbsw
ftp://ftp.netcom.com/pub/bb/bbsw
Alpha (Shareware)
Pete Keleher
8006 Barron St.
Takoma Park, MD 20912
http://www.cs.umd.edu/keleher/alpha.html
ftp://www.cs.umd.edu/pub/faculty/keleher/Alpha


Previous Table of Contents Next