CIT597 Quiz 2
Fall, 2002 |
Name_________________________________________ |
Please keep all answers short and to the point. Read each question and answer
it; don't add information that wasn't asked for.
- (5 points) What, briefly, is the difference between div
and span?
The content of a div is on a line by itself; span describes inline content.
- (5 points)Write the CSS command to make the font red in all <h2>
headers.
h2 {color: red} (-2
for font-color instead of color)
h2 {color: #FF0000} (-2 for leaving
off the # sign)
- (5 points) Suppose you have the header <h2>The
Sky</h2>. Using CSS, rewrite this line to make the font blue
only in this particular <h2>
header.
<h2 STYLE="color: #0000FF">The Sky</h2> (STYLE
can be lowercase)
<h2 STYLE="color: blue">The Sky</h2>
- (5 points) If you have both the commands from question 2 and question 3
in the same HTML document, what color is The
Sky? Why?
Blue, because the "nearer" definition is the one used when
there is a conflict.
(Could be done in 2 parts with "class"--using "important"
is wrong.)
- (12 points) Name and briefly describe the three possible values of
the display: property.
- block: content is on a line by itself
- inline: content is not put on a line by itself
- none: content is not displayed (hidden, invisible, etc.)
- (12 points) Briefly tell what each of the following refers to: border,
margins, padding.
A correctly labeled picture will be a sufficient answer.
- (8 points) Briefly define:
- Patchwork plagiarism
Taking ideas, phrases, or entire sentences from one or more sources
and rearranging them.
- Lazy plagiarism
Failing to distinguish adequately between your own work and that
of others.
- (12 points) Write the XPath expression to:
- Find every <url>
element in a document.
//url
- Find the last <url>
element in a document.
//url[last()]
- Find every <url>
element with an onsite
attribute in a document.
//url[@onsite]
- (10 points) In a few words, tell what the following XPath expressions find:
- //@size
Every size attribute, everywhere in the document
- //[@size]
Every element with a size attribute, everywhere in the document
- (8 points) What two common problems does xsl:text
help solve?
- XSL isn’t very careful with whitespace in the document
- Since XML defines only five entities, you cannot readily put other
entities (such as ) in your XSL
- (8 points) For each of the following XSL tags, tell whether it is a container.
- xsl:value-of
No
- xsl:apply-templates No
- xsl:call-template Yes
- xsl: sort No
- (5 points) What is unusual about the way parameters are passed to a template?
They are matched by name, rather than by position
- (5 points) What is the abbreviation for parent::node()
? .. (That's
dot dot)