Advanced Web Technologies

Blog posts as part of the BSc Internet Application Development programme to discuss my experience while working on the tasks that will be given during the Advanced Web Technologies module.

  1. Have a look at the documents below. Some are XML documents, some are HTML documents, some may be neither. See if you can decide which are which.
  2. Make a list of the distinctive characteristics of an XML document, in terms of things that you can spot when looking at the code.
  3. Assume that (with suitable changes) all these documents could become XML documents. Imagine, and describe, applications that could use these documents.
  4. NB I’ve removed one or more lines from each document to stop it being too easy.

Document 1

  1. This document is an HTML document which also contains javascript inside.
  2. It is an HTML document because it has tags such as "head", "title", "body", "table" and "meta". An HTML document, the root element should be <html>. In this case, inline styling is used instead of an external CSS file.
  3. This could be used to read data. In this case, a set of symptoms can be taken and a range of diagnoses will be offered.

Document 2

  1. This document is an XML document.
  2. The DTD is declared externally, wrapped in a DOCTYPE definition. The second line consists of and XSL declaration, which is used to style the XML document. In this document, "advertising" is the root element.
  3. This could be used to display adverts and contact information as regards to the advert.

Document 3

  1. This document is an HTML document containing javascript code.
  2. In this HTML document, a form is created, and when the button is clicked, the loadFile() function will be called.
  3. This applications could be used for spots analysts to load a list of the countries, and depending on the country, the list of players will be appear.

Document 4

  1. This document is an XML document.
  2. The DTD is declared externally, wrapped in a DOCTYPE definition. In this document, "story" is the root element.
  3. This could be used to load a book in the web browser.

Document 5

  1. This document is an XML document.
  2. The DTD is declared internally, that is, inside the XML document. This XML file is not valid because there are missing end tags for "title", "stanza", "line" and "poem".
  3. This may be used to store a number of poems for educational purposes, such as English literature.

Document 6

  1. This document is an XML document.
  2. The DTD is declared externally. The syntax for a DTD declaration is:
    <!DOCTYPE root-element [element-declarations]>
    Therefore, this XML document contains an error in the root element because the root element in the DTD declaration is "countryCollecton", while in the XML is "countryList".
  3. This may be used to display basic information about a country, for a geography test.

Document 7

  1. This document is an HTML document.
  2. This document does not contain the "title" tag. This file also consists of javascript where the global variable contains an XML string.

Question Sheet:

Question sheet: Lab 2

0 comments:

Post a Comment