CIT597 Quiz 2
Fall, 2002

Please keep all answers short and to the point. Read each question and answer it; don't add information that wasn't asked for.

  1. (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.

  2. (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)

  3. (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>

  4. (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.)

  5. (12 points) Name and briefly describe the three possible values of the display: property.
    1. block: content is on a line by itself

    2. inline: content is not put on a line by itself

    3. none: content is not displayed (hidden, invisible, etc.)

  6. (12 points) Briefly tell what each of the following refers to: border, margins, padding. A correctly labeled picture will be a sufficient answer.
  7. (8 points) Briefly define:
    1. Patchwork plagiarism
      Taking ideas, phrases, or entire sentences from one or more sources and rearranging them.
    2. Lazy plagiarism
      Failing to distinguish adequately between your own work and that of others.

  8. (12 points) Write the XPath expression to:
    1. Find every <url> element in a document.

    2. Find the last <url> element in a document.

    3. Find every <url> element with an onsite attribute in a document.

  9. (10 points) In a few words, tell what the following XPath expressions find:
    1. //@size
      Every size attribute, everywhere in the document

    2. //[@size]
      Every element with a size attribute, everywhere in the document

  10. (8 points) What two common problems does xsl:text help solve?
    1. XSL isnít very careful with whitespace in the document

    2. Since XML defines only five entities, you cannot readily put other entities (such as &nbsp;) in your XSL

  11. (8 points) For each of the following XSL tags, tell whether it is a container.
    1. xsl:value-of      No

    2. xsl:apply-templates     No

    3. xsl:call-template     Yes

    4. xsl: sort     No

  12. (5 points) What is unusual about the way parameters are passed to a template?
    They are matched by name, rather than by position

  13. (5 points) What is the abbreviation for parent::node() ?     ..    (That's dot dot)