Web Technology - Lab Manual

Week 2

  1. Discuss the relationship between HTML 4.01, XHTML 1.0, SGML and XML. (max 200 words)
  2. Imagine you work for a product development team on a personal photo management application. The product needs to be able to store short textual descriptions for each photo. The current design is to store these descriptions in a proprietary, binary and application-specific format. Someone in the team suggests to store these in XML. Provide briefly the pros and cons of the two options. Use a table with a row for each format, and columns for the different criteria. Fill each cell with a short (max 5 words) indication how the formats scores on each criterion.
  3. Can you use Chinese or Arabic in your XML tags? Why or why not?
  4. Indicate in one sentence the key difference between XML 1.0 and XML 1.1. Why is XML 1.0 still more popular that XML 1.1?
  5. Give the key disadvantages of the syntax of XML DTDs.
  6. CSS does not use XML syntax. Give the key advantage and a possible disadvantage.
  7. You can use CSS to style XHTML documents, but also to style XML documents with other vocabularies, for example the "MyOwnXML" vocabulary you designed yourself. Explain the key difference between using CSS for XHTML versus CSS for MyOwnXML documents.
  8. Consider the following document:
    <root1>
    </root1>
    <root2>
    </root2>
    
    Will a validating parser parse this without reporting errors? Explain.
    Will a non-validating parser parse this without reporting errors? Explain.
  9. You have designed your own XML Namespace and have provided a URI that applications can use as the name of the namespace. What should happen if users try to resolve that URI? Explain your answer.
  10. Explain the key difference between a DOM-based and SAX-based API. Give a typical application for which you would use DOM, and a typical application for which you would use SAX.
  11. What is the purpose of XPath?
  12. Give a natural-language description of the following XPath expressions:
    1. /artwork[creation-date<1900]/title
    2. /artwork/creator/name[1]
  13. Consider the following four path expressions:
    p
    /p
    //p
    .//p
    
    Briefly explain which element(s) are addressed by each expression.
  14. Describe the major similarities and differences between Java and JavaScript
  15. What does the acronym "AJAX" stand for? Explain the role of the term the first "A" refers to.
  16. What is the role of the host objects in JavaScript? Name two often used host objects. Why are there no equivalents in Java?
  17. Name two objects that are built into the JavaScript language. Briefly explain their role.
  18. How do you set in CSS a document's background color to the color with RGB values 255,255,255 using decimal numbers and the functional notation? (tip: check section 4 of the CSS Level 2 Recommendation)
    How do you achieve the same effect using JavaScript and the DOM API? (Tip: give the answer, but also include the same JavaScript in a script element into this document and check if it really works with several color values. This will save you time with answering the next question!)
  19. Briefly explain the role of events and event listeners in JavaScript.
    Suppose a third-party software component generates an event object e, where e.newValue is a JavaScript array of R, G, B values. Write an event listener function that takes such an event as an argument and uses the color value to set the current document's background color. (Tip: check if the function really works. This will save you time making Assignment 3!)
  20. Watch the "featured video" from the Google Developers Day in 2007 at http://code.google.com/apis/maps/
    Summarize in three lines the "message" of the video.

Valid
          XHTML 1.0!