COMP249 Web Technology
Tutorial - Week 10
Answer the following questions and hand in your answers in a text file (Notepad .txt) via WebCT before 9am Tuesday, May 6th, 2007.
The following are some details of units and their tutorials:
COMP249:
- Mon: 17 E6A133; 17 E7B164
- Tue: 12 E6A131; 12 E8A386
- Thu: 11 E8A386; 11 E6A131
- Fri: 12 E7B264; 12 E6A131
COMP248:
- Tuesday 10-11am (E6A131)
- Tuesday 11am-12pm (E6A131)
- Wednesday 11am-12pm (E6A131)
- Friday 12-1pm (E7B163)
- Friday 3-4pm (E5A118)
- Comment on the coding of this information in these two cases. What would the advantages be of coding it in XML for machine consumption?
- Produce an example XML encoding for the data; just show the XML, don't write a DTD.
Additional topics for discussion in the tutorial (not for handing in):
- Write a DTD to describe the XML document you end up with for the above task.
- Write an XML document that conforms to the following DTD (which is taken from
the LingoTeach project):
<!ELEMENT lingoteach (general, gtk)> <!ATTLIST lingoteach version CDATA #REQUIRED> <!ELEMENT general (value*)> <!ELEMENT value (#PCDATA)> <!ATTLIST value type CDATA #REQUIRED> <!-- gtk related stuff --> <!ELEMENT gtk (language*, learn*, train*)> <!ELEMENT language (#PCDATA)> <!ATTLIST language mode CDATA #REQUIRED type CDATA #REQUIRED> <!ELEMENT learn (#PCDATA)> <!ATTLIST learn type CDATA #REQUIRED> <!ELEMENT train (#PCDATA)> <!ATTLIST train type CDATA #REQUIRED>What is the shortest conforming XML document? - How many different ways can you find to encode a two dimensional array of data as an XML document? Defend your favourite encoding - why is it better than the others?