WordPerfect lets you create content-rich XML documents containing tables and graphics.
In this section, you'll learn about
inserting graphics
editing graphics
inserting tables
Inserting graphics
You can insert graphics just as you would when you create any other document using WordPerfect. When you insert a graphic into an XML document, the graphic is automatically tagged with start and end tags for the graphics box.
You can associate a graphic with an element. You can also associate a graphic element with a WordPerfect feature. By doing so, changes made to the graphic in terms of size, position, rotation, scale, or borders are captured in the attributes defined for the graphic element.
The number of attributes associated with a graphic element is defined in the DTD. For an example, see the LETTER.DTD stored in X:\Program Files\Corel\WordPerfect Office 11\XML\Tutorial, where "X" is the drive where the application is installed.
The WordPerfect XML Project Designer provides for nine attributes:
graphic reference
width
height
horizontal position
vertical position
border
scale X
scale Y
rotation
To insert a graphic
1 Position the cursor where a graphic element is valid.
2 Choose a graphic element from the Valid elements list box on the property bar.
3 Click Insert Graphics From file.
4 Choose the drive and folder where the file is stored.
5 Choose the file.
6 Click Insert.
To associate a graphic with an element
1 Select a graphic.
2 Click XML Box XML elements.
3 Choose an element from any of the following list boxes:
Box-lets you choose the element that will be associated with the graphic box
Content-lets you choose the element that will be associated with the content of the graphic box
Caption-lets you choose the element that will be associated with the caption of the graphic box
Note
You must set the layout in which you created the graphic association as the default layout for the graphic to be rendered in the XML document.
Tip
You can also change graphic associations by clicking the Box elements button on the property bar.
To associate a graphic with a WordPerfect feature
1 Click Format Edit layout.
2 Choose a graphic element from the Element rule list.
3 Click Edit Element associate.
4 Choose a graphic element from the Element list.
5 Choose Image box from the Association list box.
6 Choose an element from any of the list boxes in the Graphic attributes area.
Tip
You can remove an association from an element by choosing Normal from the Association list box in the Element associate dialog box.
Editing graphics
Once you have inserted a graphic into a WordPerfect XML document, you can then edit the graphic. WordPerfect lets you set a graphic to move with a page. You can also set the size of a graphic; or rotate a graphic.
To set a graphic to move with a page
1 Select a graphic.
2 Click Edit Edit graphic box.
3 Click Position.
4 In the Box position dialog box, choose Page from the Attach box to list box.
5 Type a value in the Horizontal box, and choose a page location from the From list box.
6 Type a value in the Vertical box, and choose a page location from the From list box.
If you choose Right column, Left column, or Centered in columns, type a value in the Across columns boxes.
You can also
Set a graphic to move with a paragraph Choose Paragraph from the Attach box to list box.
Set a graphic to move with the words in a line Choose Character from the Attach box to list box.
To set the size of a graphic
1 Select a graphic.
2 Click Edit Edit graphic box.
3 Click Size.
4 In the Width area, enable one of the following options:
Set-lets you specify the width of the graphic
Full-lets you set the width of the graphic to fit a full page or column
Maintain proportions-lets you set the width of the graphic to the original proportions
5 In the Height area, enable one of the following options:
Set-lets you specify the height of the graphic
Full-lets you set the height of the graphic to fit a full page or column
Maintain proportions-lets you set the height of the graphic to the original proportions
To apply a border to a graphic
1 Select a graphic.
2 Click Edit Edit graphic box.
3 Open the Border picker, and click a border.
You can also
Fill a graphic Open the Fill picker, and click a fill.
Wrap text around a graphic Click the Wrap text picker, and click a text wrap option.
To rotate a graphic
1 Select a graphic.
2 Click Edit Edit graphic box.
3 Click Image tools.
4 In the Image tools dialog box, click Rotate.
5 Drag a rotation handle.
You can also
Flip a graphic horizontally Click Horizontal flip.
Flip a graphic vertically Click Vertical flip.
Inserting tables
You can insert tables in to a WordPerfect XML document. To insert tables, you must add a table declaration fragment to a DTD.
WordPerfect includes table DTD fragments that support the following types of markup:
Association of American Publishers (AAP)-Defined by the AAP in Markup of Tabular Material, part of the Electronic Manuscript Series designed for use with the American National Standard for Electronic Manuscript Preparation and Markup
Computer-aided Acquisition and Life-Cycle Support (CALS)-Defined by the CALS initiative of the U.S. Department of Defense in military specification MIL-M-28001A
WordPerfect Table Tagging Method-WordPerfect DTD that supports tables created using WordPerfect 5.1, 6.0, 6.1, 7, 8, 9, 10 and 11
HTML-Defined by Netscape as extensions to the HTML 2.0 DTD
The following table DTD fragments are stored in X:\Program files\Corel\WordPerfect Office 11\XML\DTD, where "X" is the drive where the application is stored.
DTD Explanation
Aap_tbl.dtd Defined by Association of American Publishers (AAP).
Cals_tbl.dtd Table type defined by the CALS DTD.
Cals_xml.dtd CALS table information considered relevant to the SGML features of WordPerfect 11.
Wptable.dtd Support for WordPerfect 5.x-level tables.
Wp60tbl.dtd Full-featured table DTD designed to work with WP 6.x, 7 and 8 tables.
Wp60min.dtd Simplified version of Wp60tbl.dtd.
Html_tbl.dtd HTML 3.2 level DTD that contains a table fragment that can be used in other DTDs.
If more than one table model is supported by a given DTD, WordPerfect searches for the table model in the following order and uses the first table model it finds, ignoring all others.
WordPerfect 6.x to 11
WordPerfect 5.x
CALS
AAP
HTML 3.2
Automatic table tagging is a powerful and useful XML feature. If you have many tables in a document, you can save time by not marking up tables manually. You can assign table tags one table at a time or to all the tables in a document.
To insert a table in an XML document
Click the Table QuickCreate button on the toolbar and drag to specify the number of rows and columns for the table.
To add a table declaration to a DTD
1 Open a DTD in Notepad.
2 Position the cursor on the first blank line after the last element.
3 Type the following text:
<!ENTITY % reference name PUBLIC "-//COREL//DTD WordPerfect XML table support//EN"
"DTD file name">
Reference name is the name of your table reference; for example, calsXML. DTD file name is the name and file extension of the table DTD fragment; for example, cals_xml.dtd.
4 On the next blank line, type %reference name;.
Reference name is the name of your table reference; for example, calsXML.
5 Click the File Save.
Note
For the table declaration to be valid you must add an entry in the catalog file that indicates the table model for the XML document. For more information about catalog files, see "Working with catalog files."
To assign a tag to a table in an XML document
1 Click inside a table.
2 Click XML Tag tables.
3 Click Tag current.
Notes
If the Tag tables command is unavailable, the DTD you are using does not support tables. For more information about supported table types, see "Adding objects to an XML document."
If you tag a table and later adjust its layout (for example, join two cells or change a cell border), you should re-tag the table. If you have manually edited some of the table tags and changed attribute values, all those changes will be lost when you retag the table.
Tips
You can view table tags in the XML Tree, or by clicking View Reveal codes.
You can also tag tables by clicking the Tag tables button on the property bar.
To assign a tag to all the tables in an XML document
1 Click inside a table.
2 Click XML Tag tables.
3 Click Tag all.
Notes
If the Tag tables command is unavailable, the DTD you are using does not support tables. For more information about supported table types, see "Adding objects to an XML document."
If you tag a table and later adjust its layout (for example, join two cells or change a cell border), you should re-tag the table. If you have manually edited some of the table tags and changed attribute values, all those changes will be lost when you retag the table.
Tips
You can view table tags in the XML Tree, or by clicking View Reveal codes.
You can also tag tables by clicking the Tag tables button on the property bar.