XML

Workshop

The Workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.

Quiz

1.

What is the significance of style sheets for HTML documents?

2.

What kinds of standard elements does XML include for describing the appearance of XML documents?

3.

What are the two major parts of XSL?

4.

In the Tall Tales trivia example, how did the talltales.xsl style sheet make use of CSS to format the talltales_xslt.xml document?

Quiz Answers

1.

A style sheet addresses the presentation needs of HTML documents by defining layout and formatting rules that tell a browser how to display the different parts of a document.

2.

XML doesn't include any kind of standard elements for describing the appearance of XML documents, which is why style sheets are so important for displaying XML documents.

3.

The two major parts of XSL are XSLT (XSL Transformation) and XSL-FO (XSL Formatting Objects). XSLT allows you to translate XML documents into other languages, but it doesn't tackle the same layout and formatting issues as CSS. XSL-FO addresses the layout and formatting of XML documents, and is considered a superset of CSS.

4.

The talltales.xsl style sheet made use of inline CSS styles to format the talltales_xslt.xml document, which means that style rules were applied directly within HTML tags.

Exercises

1.

Modify the talltales.css style sheet so that the fonts and colors are different. Open the talltales_css.xml document in a web browser to view the results.

2.

Try to match the changes you just made to the talltales.css style sheet in the talltales.xsl style sheet. Open the talltales_xslt.xml document in a web browser to view the results.

by BrainBellupdated
Advertisement: