HTML and CSS Reference
In-Depth Information
In the Lab continued
Perform the following tasks:
1. Use Notepad++ to open the lab12-2flight_data.txt file from the Chapter12\IntheLab folder of the
Data Files for Students.
2. Create an XML data file using this data and save the file as lab12-2flight_flight_solution.xml.
3. Start another new Notepad++ session, open the lab12-2flight-table.html file, and save it as
4. Use the code presented in Figures 12-32 through 12-34 on pages HTML 598 through HTML
600 as a guide to write the HTML code to display the flights in a table. Set the attributes to display
five rows at a time in the table. Do not forget to add the <xml> tag to bind the XML file as a data
island. Save your HTML file.
5. Start Internet Explorer and test your HTML file. If the table does not display, check the spelling of
your data source objects and datafld attributes in the table cells.
6. Start a new Notepad++ document, and open the lab12-2flight-search.html file, and save it as
7. Use the code in Table 12-35 as a guide to enter the <input> and <button> elements for the search. Use
the code in Figure 12-39 as a guide to enter the <div> tag container for the output results.
8. Use the code in Tables 12-36, 12-37, and 12-38 as a guide to start a JavaScript section and enter
the findFlights() user-defined function to search for flights by destination.
9. Use the code in Table 12-39 as a guide to create the keyPressed() user-defined function. Use the code
in Table 12-40 to create the clearField() user-defined function and to close the <script> section.
10. Save the completed HTML file and test it using your browser. If an error occurs, check your code
and save and test again.
11. Submit the completed XML file and HTML Web pages in the format specified by your instructor.
In the Lab
Lab 3: Creating the Texas Career Services Web Site
Instructions: You work for Texas Career Services, a nationally known job clearinghouse. You recently
converted the jobs data to an XML data island to allow clients to browse or search for currently available
jobs. Your assignment is to create the Web pages depicted in Figure 12-52 on the next page. The Web
pages include an XML instance document displayed using an XSL style sheet in job title order, a Web
page that displays the jobs in an HTML table, and the ability to search for jobs by job title.
The lab12-3homesolution.html home page is provided in the Data Files for Students. This page
has links to the three pages. You will create the lab12-3jobs_solution.xml and lab12-3jobs_solution.xsl
to display the available jobs in a formatted list. You will create lab12-3jobs_solution.xml and
lab12-3jobstable_solution.html to display jobs in an HTML table. You will create
lab12-3searchjobs_solution.html to allow users to search position by title.
Perform the following tasks:
1. Using the techniques learned in this chapter, create an XML data island from the lab12-3jobs_data.txt
file found in the Data Files for Students. The data in this file is in job title order. Test the XML file to
make sure it is error-free and well-formed. Save the file as lab12-3jobs_solution.xml.
2. Using the techniques learned in this chapter, write XSL code to create an XSL style sheet that will
display the jobs data island in title order. Use the style definitions for the text and element items
listed in Table 12-42 to create the XSL style sheet. Save this file as lab12-3jobs_solution.xsl.
In addition, add the proper XML processing statement to link the XSL style sheet to the
lab12-3jobs_solution.xml file created in Step 1.
Search WWH ::

Custom Search