Creating a Form with an Editor

   

The XML editor used in this chapter is XMetaL from SoftQuad. If you are familiar with other XML editors such as XML Spy or XML Notepad, you will find that XMetaL is significantly more powerful.

XMetaL provides tools to completely hide the markup language behind a word processor interface. This is ideal for applications targeted at non-technicians: The newspaper clerk couldn't care less about the structure document and the markup. He wants a simple form and a familiar interface.

Compare XML Notepad in Figure 3.2 with XMetaL in Figure 3.1. XML Notepad throws the markup in your face. It's great for developers ”you and I love it ”but it's a nightmare for average computer users.

Figure 3.2. Which looks friendlier? XMetaL or XML Notepad?

graphics/03fig02.gif

However, XMetaL is a dual-face tool. It looks like a word processor to the user , but it's a programming toolkit for the developer. In this chapter, you learn how to use this toolkit.

Installing XMetaL

To run this project, you need a copy of XMetaL. The companion CD includes an evaluation copy of XMetaL 1.0, which you can use for testing.

For more information, visit the XMetaL Web site (http://www.xmetal.com) or the SoftQuad site (http://www.softquad.com).

Warning

Note that XMetaL is a commercial product. Although it uses several standards, XMetaL is not a standard itself. New versions might introduce incompatibilities that I could not foresee at the time of this writing. You might want to check the Web site (http://www.marchal.com) for an update.


In the following sections, you will completely configure the editor so it is optimized for your XML document. The steps we will follow are

  1. Define the model of the document; in other words, decide on which information to collect.

  2. Create a template, which is an empty form the clerk uses to get started.

  3. Style the document so it looks good onscreen.

  4. Customize the behavior of the editor so it recognizes your elements.

  5. Develop macros to customize toolbars and menus and to validate the document.

   


Applied XML Solutions
Applied XML Solutions
ISBN: 0672320541
EAN: 2147483647
Year: 1999
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net