The analysis of the proposed solutions will be conducted on the basis of the example presented below. The XML document instance that describes titles, authors and supervisors of students thesis (Master and BA) in the Polish universities, will be taken into consideration. Let's assume, the task formulated in XML module by the tutor, is:
Write the well-formed instance of the XML document for the universities students’ thesis data. First,data about the name of the university should be stored. Then – subsequently – for each student after defence, the student register number, the type (Master or BA) and title offinally, the name of student’s promoter and his titles should be placed.
Additional requirements: use the tag <List> for the root element. Don’t use tag attributes – onlyElement components. All data about the Master or BA thesis of the specified student should be described in 1 element. The description about each kind of a student’s thesis should be contained in separate elements. The solution should contain an example data for 2 students from different universities. Suppose, first student is after Master and BA defence in Silesian Technical University, while second – only after BA in AGH University.
There are a lot of possibilities to formulate the given XML document instance for the given task. Two sample alternative XML documents of given requirements, where the names of the tags are not significantly different (University vs. UnivName, TypeBA vs. BA, etc.), are shown in (Figure 2.1).
The XML Schema shown in the (Figure 2.2) defines the structure of described sample XML document, will be used to present mechanisms introduced in the MOODLE platform.
- 4257 reads