CIT597 Quiz 3
Fall, 2003
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.

  1. (4 points) What does each of the following acronyms stand for?

    1. XSLT

    2. XSL-FO


  2. (20 points) Tell, in words, what each of the following XPath expressions means.

    1. x/y/*


    2. //x/y


    3. //x[@y]


    4. //x[@*]


  3. (10 points) Starting from a given node, there are five axes that form a partition of all the nodes in an XML tree. Name all five.




  4. (5 points) What does <xsl:template match="/"> say to select?




  5. (5 points) In XSL, what would you write to get the contents of a <message> tag?



  6. (4 points) What two files are needed in order to use XSLT?



  7. (2 points) What XSL statement is the equivalent of Java's switch statement?



  8. (9 points) Which would be better for each of the following situations, SAX or DOM?

    1. You want to collect and display headlines only from an XHTML web site.


    2. You want to update and maintain the XML files for a "Browser Helper" that you use to keep track of interesting web pages.
      .

    3. You want to check whether your Browser Helper file contains any references to JUnit testing.


  9. (5 points) Briefly, what is the advantage of a factory method over a constructor?





  10. (36 points) Label each of the following as SAX, DOM, both, or neither:
    getAttributes() ErrorHandler Attribute
    startElement() getXMLReader() Attr
    removeAttribute(name) getQName(index) DocumentBuilderFactory
    getNodeType() normalize() characters(char[], int, int)