ETD Guide/Students/In WordPerfect
WordPerfect supports structured writing since version 7. Most of the following text has been taken from a Whitepaper by Corel Inc. that appeared for WordPerfect 9 in June 1999.
Writing XML using WordPerfect means that the author is forced to use specific structures. The software will parse the file by an underlying XML parser and check correctness of the written file while it is being written by the author. This may cause the system to slow down sometimes because the parsing process may take a lot of the system’s resources during that time. Generally, the writing behavior is different than the one for systems like Microsoft Word, where no parsing during runtime is being performed. As the author, you will have to think about your document structure, on how the information pieces are put together and follow each other (e.g. if something is supposed to be a heading or the beginning of a new chapter).
Standard WordPerfect 9 templates allow users to embed XML components. These WordPerfect templates include the following XML components:
- Document Type Definition (DTD)
- Compiled version of the DTD, a Logic file (LGC)
- Layout Specification Instance (LSI)
- Alias File (LNM)
The Document Type Definition (DTD) defines the elements and the structured relationship between the elements, entities and attributes. The DTD defines all valid elements; the order in which they can be used and how many times a particular element can appear in a document. When compiled as binary logic file (LGC) by the Word Perfect DTD Compiler, the DTD is integrated to a WordPerfect Template along with the Layout Specification Instance File and the Alias File.
The Layout Specification Instance (LSI) specifies formatting information, such as bold, underline, italics etc., for the start and end tags. Layout files can associate elements with their respective WordPerfect styles. It is possible to insert a specific WordPerfect formatting command or a text string before, after or in place of a specified XML element. The .lsi file can run macros when users insert a specific element, so template designers can build dialog boxes, prompts and other help to the authors in order to support them in writing correct XML documents. It is possible to use several .lsi files with the same DTD. This is useful if multiple output formats have to be produced from the file, e.g. one for printing and one for online publishing. When compiled the .lsi file integrates to a WordPerfect template.
An Alias file (LNM) specifies the descriptive names for elements in the DTD. This is useful when the tag names defined in the DTD are not appropriate for the end user. This may be because templates are created for end users who speak a different language or are created for a different audience. For instance non-technical users may relate to different tag names than technical users. WordPerfect also provides standards templates to the user and allows the creator to customize the user interface with menu items, toolbars and view of specific documents. All those elements may include and run macros.
Example:
An example of a DTD, a LSI file and a WordPerfect template for digital dissertations used in Germany (Humboldt-University Berlin) is provided to the users of the guide. If you want to write a dissertation in XML using WordPerfect you have to work with the SGML/XML functionality. Please consult the information center of the installation CD-Rom of the WordPerfect suite with the keyword SGML. A detailed installation and usage guide will be shown.
You will need the following files:
- diml1_0.dtd
- diml1_0.lgc Logic file
- diml.lsi Layout file
- diml.lnm Alias file
- dissertation.wpt Dissertation style sheet
WordPerfect provides the user also with the following programs:
- a XML File Wizard,
- a XML Project Designer,
- a XML DTD Compiler,
- a structured Tree View,
In order to compile a DTD into a Logic file, you have to follow the steps:
1. copy the following files into the corel\suite8\programs\mapfiles directory: diml1_0.dtd; cals_tbl.dtd;hubspec.ent
2. Edit the iso8879.map file in a text editor:
Add the lines:
PUBLIC "-//HUBspec//ENTITIES Special Symbols//EN" "hubspec.ent"
PUBLIC "-//HUB//DTD Cals-Table-Model//EN" "cals_tbl.dtd"
Press Compile. Now the LGC file has been produced and is usable for writing an SGML/XML document.
You can now open WordPerfect and choose Tools / SGML / Document types. Here point to the created diml1_0.LGC file and if you want to use a standard layout to the diml.LSI file.
Your own layout can be produced using the Layout Designer program that is in the WordPerfect suite. Just choose open diml1_0.lsi or open a new file and start creating or manipulating your own layout style.
Start writing a dissertation directly with SGML/XML by choosing under WordPerfect the option Tools / SGML / Document types.
Usually there has been a native WordPerfect template produced in order to help you with additional drop down menus etc. To use the provided template for WordPerfect 8 you have to choose File / New / Options / Add Project / Add new document / Call it "Digital Dissertation" / Search for dissertation.WPT. This allows you now to use the WordPerfect style sheet by choosing under the main window: File / New / Choose "Digital Dissertation" and Create. This enables the functions of the drop down menu as in the following figure.
Next Section: In LaTeX