home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / Data1.cab / _0152F03A8A5C440CBDD631F7F364AB69 < prev    next >
Text File  |  2003-03-07  |  10KB  |  312 lines

  1. Adding objects to an XML document
  2.  
  3. WordPerfect lets you create content-rich XML documents containing tables and graphics.
  4.  
  5. In this section, you'll learn about
  6.  
  7.   inserting graphics
  8.   
  9.   editing graphics
  10.   
  11.   inserting tables
  12.   
  13. Inserting graphics
  14.  
  15. 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.
  16.  
  17. 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.
  18.  
  19. 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.
  20.  
  21. The WordPerfect XML Project Designer provides for nine attributes:
  22.  
  23.   graphic reference
  24.   
  25.   width
  26.   
  27.   height
  28.   
  29.   horizontal position
  30.   
  31.   vertical position
  32.   
  33.   border
  34.   
  35.   scale X
  36.   
  37.   scale Y
  38.   
  39.   rotation
  40.   
  41. To insert a graphic
  42.  
  43. 1    Position the cursor where a graphic element is valid.
  44.  
  45. 2    Choose a graphic element from the Valid elements list box on the property bar.
  46.  
  47. 3    Click Insert  Graphics  From file.
  48.  
  49. 4    Choose the drive and folder where the file is stored.
  50.  
  51. 5    Choose the file.
  52.  
  53. 6    Click Insert.
  54.  
  55. To associate a graphic with an element
  56.  
  57. 1    Select a graphic.
  58.  
  59. 2    Click XML  Box XML elements.
  60.  
  61. 3    Choose an element from any of the following list boxes:
  62.  
  63.   Box-lets you choose the element that will be associated with the graphic box
  64.   
  65.   Content-lets you choose the element that will be associated with the content of the graphic box
  66.   
  67.   Caption-lets you choose the element that will be associated with the caption of the graphic box
  68.   
  69. Note
  70.  
  71.   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.
  72.   
  73. Tip
  74.  
  75.   You can also change graphic associations by clicking the Box elements button on the property bar.
  76.   
  77. To associate a graphic with a WordPerfect feature
  78.  
  79. 1    Click Format  Edit layout.
  80.  
  81. 2    Choose a graphic element from the Element rule list.
  82.  
  83. 3    Click Edit  Element associate.
  84.  
  85. 4    Choose a graphic element from the Element list.
  86.  
  87. 5    Choose Image box from the Association list box.
  88.  
  89. 6    Choose an element from any of the list boxes in the Graphic attributes area.
  90.  
  91. Tip
  92.  
  93.   You can remove an association from an element by choosing Normal from the Association list box in the Element associate dialog box.
  94.   
  95. Editing graphics
  96.  
  97. 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.
  98.  
  99. To set a graphic to move with a page
  100.  
  101. 1    Select a graphic.
  102.  
  103. 2    Click Edit  Edit graphic box.
  104.  
  105. 3    Click Position.
  106.  
  107. 4    In the Box position dialog box, choose Page from the Attach box to list box.
  108.  
  109. 5    Type a value in the Horizontal box, and choose a page location from the From list box.
  110.  
  111. 6    Type a value in the Vertical box, and choose a page location from the From list box.
  112.  
  113. If you choose Right column, Left column, or Centered in columns, type a value in the Across columns boxes.
  114.  
  115.  
  116.  
  117. You can also    
  118.  
  119. Set a graphic to move with a paragraph    Choose Paragraph from the Attach box to list box.
  120.  
  121. Set a graphic to move with the words in a line    Choose Character from the Attach box to list box.
  122.  
  123.  
  124.  
  125. To set the size of a graphic
  126.  
  127. 1    Select a graphic.
  128.  
  129. 2    Click Edit  Edit graphic box.
  130.  
  131. 3    Click Size.
  132.  
  133. 4    In the Width area, enable one of the following options:
  134.  
  135.   Set-lets you specify the width of the graphic
  136.   
  137.   Full-lets you set the width of the graphic to fit a full page or column
  138.   
  139.   Maintain proportions-lets you set the width of the graphic to the original proportions
  140.   
  141. 5    In the Height area, enable one of the following options:
  142.  
  143.   Set-lets you specify the height of the graphic
  144.   
  145.   Full-lets you set the height of the graphic to fit a full page or column
  146.   
  147.   Maintain proportions-lets you set the height of the graphic to the original proportions
  148.   
  149. To apply a border to a graphic
  150.  
  151. 1    Select a graphic.
  152.  
  153. 2    Click Edit  Edit graphic box.
  154.  
  155. 3    Open the Border picker, and click a border.
  156.  
  157.  
  158.  
  159. You can also    
  160.  
  161. Fill a graphic    Open the Fill picker, and click a fill.
  162.  
  163. Wrap text around a graphic    Click the Wrap text picker, and click a text wrap option.
  164.  
  165.  
  166.  
  167. To rotate a graphic
  168.  
  169. 1    Select a graphic.
  170.  
  171. 2    Click Edit  Edit graphic box.
  172.  
  173. 3    Click Image tools.
  174.  
  175. 4    In the Image tools dialog box, click Rotate.
  176.  
  177. 5    Drag a rotation handle.
  178.  
  179.  
  180.  
  181. You can also    
  182.  
  183. Flip a graphic horizontally    Click Horizontal flip.
  184.  
  185. Flip a graphic vertically    Click Vertical flip.
  186.  
  187.  
  188.  
  189. Inserting tables
  190.  
  191. You can insert tables in to a WordPerfect XML document. To insert tables, you must add a table declaration fragment to a DTD.
  192.  
  193. WordPerfect includes table DTD fragments that support the following types of markup:
  194.  
  195.   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
  196.   
  197.   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
  198.   
  199.   WordPerfect Table Tagging Method-WordPerfect DTD that supports tables created using WordPerfect 5.1, 6.0, 6.1, 7, 8, 9, 10 and 11
  200.   
  201.   HTML-Defined by Netscape as extensions to the HTML 2.0 DTD
  202.   
  203. 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.
  204.  
  205.  
  206.  
  207. DTD     Explanation
  208.  
  209. Aap_tbl.dtd    Defined by Association of American Publishers (AAP).
  210.  
  211. Cals_tbl.dtd     Table type defined by the CALS DTD.
  212.  
  213. Cals_xml.dtd    CALS table information considered relevant to the SGML features of WordPerfect 11.
  214.  
  215. Wptable.dtd    Support for WordPerfect 5.x-level tables.
  216.  
  217. Wp60tbl.dtd    Full-featured table DTD designed to work with WP 6.x, 7 and 8 tables.
  218.  
  219. Wp60min.dtd    Simplified version of Wp60tbl.dtd.
  220.  
  221. Html_tbl.dtd    HTML 3.2 level DTD that contains a table fragment that can be used in other DTDs.
  222.  
  223.  
  224.  
  225. 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.
  226.  
  227.   WordPerfect 6.x to 11
  228.   
  229.   WordPerfect 5.x
  230.   
  231.   CALS
  232.   
  233.   AAP
  234.   
  235.   HTML 3.2
  236.   
  237. 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.
  238.  
  239. To insert a table in an XML document
  240.  
  241.   Click the Table QuickCreate button on the toolbar and drag to specify the number of rows and columns for the table.
  242.   
  243. To add a table declaration to a DTD
  244.  
  245. 1    Open a DTD in Notepad.
  246.  
  247. 2    Position the cursor on the first blank line after the last element.
  248.  
  249. 3    Type the following text:
  250.  
  251.  
  252.  
  253. <!ENTITY % reference name PUBLIC "-//COREL//DTD WordPerfect XML table support//EN"
  254.  
  255. "DTD file name">
  256.  
  257. 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.
  258.  
  259. 4    On the next blank line, type %reference name;.
  260.  
  261. Reference name is the name of your table reference; for example, calsXML.
  262.  
  263. 5    Click the File  Save.
  264.  
  265. Note
  266.  
  267.   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."
  268.   
  269. To assign a tag to a table in an XML document
  270.  
  271. 1    Click inside a table.
  272.  
  273. 2    Click XML  Tag tables.
  274.  
  275. 3    Click Tag current.
  276.  
  277. Notes
  278.  
  279.   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."
  280.   
  281.   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.
  282.   
  283. Tips
  284.  
  285.   You can view table tags in the XML Tree, or by clicking View  Reveal codes.
  286.   
  287.   You can also tag tables by clicking the Tag tables button on the property bar.
  288.   
  289. To assign a tag to all the tables in an XML document
  290.  
  291. 1    Click inside a table.
  292.  
  293. 2    Click XML  Tag tables.
  294.  
  295. 3    Click Tag all.
  296.  
  297. Notes
  298.  
  299.   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."
  300.   
  301.   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.
  302.   
  303. Tips
  304.  
  305.   You can view table tags in the XML Tree, or by clicking View  Reveal codes.
  306.   
  307.   You can also tag tables by clicking the Tag tables button on the property bar.
  308.   
  309.  
  310.  
  311.  
  312.