xml spy
Previous  Top  Next

XML Tables


XML tables can be inserted by you, the user of Authentic View. They enable you to insert tables anywhere in the XML document where they are allowed, which is useful if you need to insert tabular information in your document. These tables will be printed out as tables when you print out directly from Authentic View. If you are also generating output with XSLT stylesheets, discuss the required output with the designer of the StyleVision Power Stylesheet.

 

Note that you can insert XML tables only at allowed locations. These locations are specified in the schema (DTD or XML Schema). If you wish to insert a table at additional locations, discuss this with the person designing the StyleVision Power Stylesheet.

 

Working with XML tables

There are three steps involved when working with XML tables: inserting the table; formatting it; and entering data. The commands for working with XML tables are available as icons in the toolbar (see XML table editing icons). Currently, XML tables cannot be inserted in the Authentic Preview of StyleVision.

 

Inserting tables

To insert an XML table:

1.Place your cursor where you wish to insert the table, and click the ic_tbl_insert_table icon. (Note that where you can insert tables is determined by the schema.) This opens the Insert Table dialog (shown below).

 

tbl_dlg_insert_table_3x3

 

2.Select the number of columns and rows, and specify whether you wish the table to extend the entire available width. For the specifications given in the dialog box shown above, the following table is created.

 

tbl_static_table_empty

 

You can add and delete columns, create row and column joins later. Create the broad structure first.

 

Please note: All modifications to table structure must be made by using the Table menu commands. They cannot be made by changing attribute values in the Attribute Entry Helper.

 

Formatting tables and entering data

To format your table:

1.Place the cursor anywhere in the table and click the ic_tbl_properties (Table Properties) icon. This opens the Table Properties dialog (see screenshot), where you specify formatting for the table, or for a row, column, or cell.

 

dlg_table_props

 

2.Set the cellspacing and cellpadding properties to "0". Your table will now look like this:

 

table_with_cell_borders

 

3.Place the cursor in the first row to format it, and click the ic_tbl_properties (Table Properties) icon. Click the Row tab.

 

table_props_row_tab

 

Since the first row will be the header row, set a background color to differentiate this row from the other rows. Note the Row properties that have been set in the figure above. Then enter the column header text. Your table will now look like this:

 

table_with_header

 

Notice that the alignment is centered as specified.

4.Now, say you want to divide the "Telephone" column into the sub-columns "Office" and "Home", in which case you would need to join cells. Place the cursor in the "Telephone" cell, and click the ic_tbl_split_vert (Split vertically) icon. Your table will look like this:

 

table_split_cell_vert

 

5.Now place the cursor in the cell below the cell containing "Telephone", and click the ic_tbl_split_horiz (Split horizontally) icon. Then type in the column headers "Office" and "Home". Your table will now look like this:

 

table_with_header_span

 

Now you will have to vertically split each cell in the "Telephone" column.

 

You can also add and delete columns and rows, and vertically align cell content, using the table-editing icons. The XML table editing icons are described in the User Reference, in the section titled "XML Table Icons".

 

Moving among cells in the table

To move among cells in the XML table, use the Up, Down, Right, and Left arrow keys.

 

Entering data in a cell

To enter data in a cell, place the cursor in the cell, and type in the data.

 

Formatting text

Text in an XML table, as with other text in the XML document, must be formatted using XML elements or attributes. To add an element, highlight the text and double-click the required element in the Elements Entry Helper. To specify an attribute value, place the cursor within the text fragment and enter the required attribute value in the Attributes Entry Helper. After formatting the header text bold, your table will look like this.

 

table_formatted

 

The text above was formatted by highlighting the text, and double-clicking the element strong, for which a global template exists that specifies bold as the font-weight. The text formatting becomes immediately visible.

 

Please note: For text formatting to be displayed in Authentic View, a global template with the required text formatting must have been created in StyleVision for the element in question.

 


Previous  Top  Next

© 2008 Altova