Section 13.5.  Create a data view

Prev don't be afraid of buying books Next

13.5. Create a data view

Your next step is to create a Web page into which you will insert data views of the expense report. To do this, you should start with a new Web page, as follows:

1. On the File menu, click New.

2. Click Blank page on the New task pane.

3. This will create a blank page named something like new_page_1.htm.

You can insert data views either in Design mode or in Code mode; it is your choice. For this exercise, click Design mode at the bottom of the window.

To see the data sources for which you can create data views:

1. On the Data menu, click Insert Data View. This will display the Data Source Catalog task pane, shown in Figure 13-1.

Figure 13-1. The Data Source Catalog task pane




2. Under XML Files, you should see the sample expense report.xml file you just imported. Right-click it, and click Show Data on the resulting context menu.

3. FrontPage will display the Data View Details task pane, shown in Figure 13-2. This task pane shows the structure of the data source, as well as any settings of the data view itself, such as styles, sorting and filtering.

Figure 13-2. The Data View Details task pane




You are now ready to begin inserting data views of the data source into your page. This is accomplished by selecting an element or elements in the task pane and clicking Insert Data View. For this example, we will focus on the repeating data (the expense items themselves).

1. Make sure the cursor is positioned in the Web page where you want to insert the data view.

2. Select the expense element, located about half way down the tree structure, and click Insert Data View.

3. This will display the expenses as a table, as shown in Figure 13-3.

Figure 13-3. Automatically generated table of expenses




The table contains a row for each expense element, and a column for each child of expense. The column headers are the child element-type names.

Amazon


XML in Office 2003. Information Sharing with Desktop XML
XML in Office 2003: Information Sharing with Desktop XML
ISBN: 013142193X
EAN: 2147483647
Year: 2003
Pages: 176

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