Working with Columns

Stylus Studio provides several features to help you work with table columns in the Grid tab. Changes you make to tables in the Grid tab, such as adding a new column or reordering existing columns, are reflected in the underlying XML document.

This section covers the following topics:

Selecting a Column

Column operations can be performed when you select any cell in a column. When a cell (and, therefore, its column) is selected, it is highlighted with a yellow outline. As shown in Figure 119, the <title> column is selected - the cell containing Java Message Service is the one that is highlighted.

To select a column, click any cell in the column you wish to select.

Adding Columns

You can add two types of columns to tables in the Grid tab - attribute columns and element columns. The procedure for adding both types of columns is the same. When you add a column, it is inserted immediately after the last column of its type. You can move columns after you create them.

To add a column:
1. Select the row in which you want to add a column.
2. Click Add Attribute Column ( ) or Add Element Column ( ). These actions are also available from the XML > Grid Editing menu and from the grid shortcut menu.

The column is added to the table.

Deleting Columns

To delete a column:
1. Select a cell in the column you want to delete.

A yellow border appears around the cell you select.

2. Click Delete Column ( ). This action is also available from the XML > Grid Editing menu and from the grid shortcut menu.

The column is deleted from the table.

Reordering Columns

You can reorder columns in the grid by dragging them to the position you desire.

To reorder a column:
1. Place the pointer on the left handle in the column header.
2. Press and hold mouse button one.

The cursor changes shape, as shown here.

4. Release the mouse button.

The column is placed in the new location within the row.

Renaming Columns

You can rename columns in the grid. This has the effect of renaming the corresponding attribute or element name in the underlying XML document.

To rename a column:
1. Select a cell in the column you want to rename.

A yellow border appears around the cell you select.

2. Click Rename Column ( ). This action is also available from the XML > Grid Editing menu and from the column shortcut menu.

The column is renamed.

Changing a Value

You can change element and attribute values.

To change a value:
1. Double-click the cell whose value you want to change.

The cell field becomes editable, as shown here.

3. Press Enter.

Stylus Studio Lends a Helping Hand to the New Orleans Reconstruction Efforts

Read how Stylus Studio is helping with the on-going hurricane Katrina reconstruction efforts in New Orleans.

XML Schema Validation

Validate XML using XML Schema with MSXML, XERCES, XSV, SYSTEM.XML, & other XSD Validators. Stylus Studio's XML Schema-Aware XML Editing makes XML Schema Validation a snap!

EDI to XML Mapping

A tutorial on how to transform EDI files into XML using Stylus Studio's Convert to XML tool. Subsequent post-processing of the converted EDI data is done through XQuery or XSLT, modeling a real world XML data integration application.

XSL-List

The XSL-List forum is a valuable learning resource for the Extensible Stylesheet Language (XSL), covering the XSL specification, XSL processor implementations, and XSL user questions. Get this free XSL resource delivered to your inbox today.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member