HTML and CSS Reference
In-Depth Information
In the Lab continued
Perform the following tasks:
1. Start a new Notepad++ file. Using the information and data in the lab12-1data.txt file, create a
well-formed XML file. Save as lab12-1asset_solution.xml.
2. Using the code in Tables 12-11, 12-12, 12-14, and 12-15 on pages HTML 573 through HTML 576
as a guide, create an XML Schema Definition file and save it as lab12-1asset_solution.xsd. Note the
format of the date in the XML instance document.
3. Start your browser. Enter www.corefiling.com/opensource/schemaValidate.html in the Address box
to view the CoreFiling XML Schema validator Web page in your browser.
4. Browse to the lab12-1asset_solution.xsd and lab12-1asset_solution.xml files, click the Validate
button, and then click the Click here link to see if any error messages display.
5. If errors exist, correct your XSD file, save it, and revalidate at the CoreFiling Web page. Do not
continue until both the XSD and XML documents are error-free.
6. Start a new Notepad++ file and save immediately as lab12-1asset_solution.xsl. Use the code
presented in Tables 12-24 and 12-28 as a guide to create an XSL style sheet to display the
formatted contents of the lab12-1asset_solution.xml file.
7. Sort the items on asset_description.
8. Use a <span> tag to format a label, Asset ID:, as bold. Use a <span> tag to format the display content
of asset_id as font-variant:small-caps, font-style:italic, font-weight:bold, and color:#834411.
9. Use an <xsl:text> tag to insert a label, Description:. Format the content of the asset_description with
font-variant as normal, font-weight as bolder, and color as #000000. Follow the description with a
comma and a space.
10. Insert a label, Location of asset:, followed by the content of asset_location formatted with an inline
style. Format font-variant as normal, font-weight as medium, color as #000000, and text-decoration
as underline. Follow the content with a comma and a space.
11. Place a label, Date asset acquired, and then format the contents of asset_date_acquired as font-
variant:normal, the font-weight:medium, and the color:#000000. Follow the content with the text
“, and date asset sold: ”. Be sure to include the spaces.
12. Format the asset_date_sold with font-variant as small-caps, font-weight as bold, and color as
#834411. Follow the date with a comma and a space, then the text “asset has a salvage value: ”.
Format the asset_salvage_value with font-variant as small-caps, font-weight as bold, and color as
#834411.
13. Be sure to close any open tags.
14. Save the completed XSL file. Activate the lab12-1asset_solution.xml file. Add the <?xml> tag to link
the XSL style sheet to the XML file. Save the XML file.
15. Test the completed XML file using your browser. If an error occurs, check your code from Steps 9
through 14, and then save and test again.
16. Submit the completed XML file, XSD file, and XSL file in the format specified by your instructor.
 
Search WWH ::




Custom Search