HTML and CSS Reference
In-Depth Information
To Close the XML and XSL Files in Notepad++
Once the XSL style sheet is complete and the XML file displays properly, you
should close the XSL and the XML files in Notepad++. The following steps close the
open files in Notepad++.
With the Notepad++ window active, right-click the chapter12-1products_solution.xml file
tab, and click Close on the shortcut menu.
Right-click the chapter12-1products.xml file tab and click Close on the shortcut menu.
Close the chapter12-1products_solution.xsl file.
Displaying XML data in an HTML table.
Long lists of data can be tedious to look at. Dividing a list into manageable pages using a
table can make the data easier to read. To plan a table:
Determine the number of rows to display on each Web page.
Determine the ID names to associate the objects properly with the table.
Create the navigation control buttons for the table.
Determine any style formatting for the data in the table.
Using an HTML Table with Paging
to Display XML Data
Linking XML Data
Island File
When using this method
to create an XML data
island, the XML file should
not have any links to XSL
style sheets nor should the
root element have a link
to any XSD schema file.
The second hyperlink on the Calumet Restaurant Supply home page (Figure 12-1c on
page HTML 563) is Table. This Web page displays a list of available product items in a
table in item-id order (Figure 12-29) using the XML file as a data island. Recall that a data
island is a set of data elements separate from the HTML Web page. The HTML Web page
binds with the XML document and displays each record element in an HTML table. In
Internet Explorer, the <table> tag has a nonstandard attribute, datapagesize, which dictates
the number of rows that can be displayed. This attribute works only in Internet Explorer.
The Web page has four buttons that use built-in browser functions, allowing users to
navigate forward and backward through the table rows or to move to the first or last page.
navigation buttons
control table appearance
with XML
four items
at a time
Figure 12-29
Search WWH ::

Custom Search