HTML and CSS Reference
Perform the following tasks:
1. Start a new Notepad++ document. Create an XSL style sheet that uses the <xsl:if> tag to display only
the breakfast items <menu_type> sorted on the <name> element. Display the menu_type as Arial,
Helvetica, sans-serif, make the font size 12pt and the font as small caps. Display the name in small
caps, but italic, bold, and the color #834411. Display the description underlined, 14 point font size, and
bold starting a new paragraph. Display the label Cost as bold and underline, but the price as normal,
medium, and color #990000. Insert a "$" in front of the price. Save this XSL file as extend12-1menu_
2. Open the extend12-1menu.xml file. Save it immediately as extend12-1menu_breakfast.xml. Using
the code shown in Figure 12-27 on page HTML 594, add the code to link the breakfast XSL style
sheet you just created to the XML document. Save the XML document.
3. With the extend12-1menu_breakfast.xsl style sheet open, save the file as extend12-1menu_lunch.xsl.
Modify the <xsl:if> tag to display only the lunch <menu_type> items sorted on the <name>
element. Save the modified XSL file. Select the extend12-1menu_breakfast.xml file and modify the
XSL style sheet link code to bind the lunch XSL style sheet to the XML document. Save the XML
document as extend12-1menu_lunch.xml.
4. With the extend12-1menu_lunch.xsl style sheet open, save the file as extend12-1menu_supper.xsl.
Modify the <xsl:if> tag to display only the supper <menu_type> items sorted on the <name>
element. Save the modified XSL file. Select the extend12-1menu_lunch.xml file and modify the
XSL style sheet link code to bind the supper XSL style sheet to the XML document. Save the
XML document as extend12-1menu_supper.xml.
5. With the extend12-1menu_supper.xsl style sheet open, save the file as extend12-1menu_choose.xsl.
Change the <xsl:if> tag and use the <xsl:choose> tag to display only the items with a price less
than $4. Change the <xsl:sort> to sort in price order. Save the modified XSL file. Select the
extend12-1menu_supper.xml file and modify the XSL style sheet link code to bind the chosen XSL
style sheet to the XML document. Save the XML document as extend12-1menu_choose.xml.
6. Start your browser. Enter G:\Chapter12\Extend\extend12-1home.html in the Address box to
view the various XML documents in your browser. If any errors occur, check your code against the
instructions in Steps 1 through 5 and then save and test the XML page again.
7. Submit the revised XML and XSL files and HTML Web page in the format specified by your
Make It Right
Analyze the XML code on a Web page and correct all errors.
Correcting Syntax Errors
Instructions: You will use the make12-1plant_list_error.xml, make12-1schema_error.xsd, and
make12-1table_error.html files from the Chapter12\MakeItRight folder of the Data Files for Students.
See the inside back cover of this topic for instructions on downloading the Data Files for Students, or
contact your instructor for information about accessing the required file.
The Stems Floral and Garden Supply XML and XSD files and Web pages have a total of five
errors. When you attempt to display the XML data file, it will only display four instances because of
an error in the fourth instance. The XSD file will not validate because of an error in the data types.
The data will not display in the HTML table because of three errors. You are to identify the errors in
all three files and correct them. The corrected Web page will show the list of floral items as shown in