Recommendations:
Tutorials and hints:
Current examples are in XML03.zip.
Look at the examples in types.xsd. Try to validate the example document. Check if the constraints are really verified.
The directory types/jaxb_generated contains Java classes which
were generated by JAXB basing on the schema. Look (in particular at Test.java)
what are the corresponding Java types used for subsequent XML Schema types
(don't overlook bad-price and bad-phone).
Is it important to use the most appropriate data type in XML Schema?
Start with students12.xsd.
Person type (students and teachers).
Define appropriate simple types for address fields (postal code, list of known countries...)Example definitions can be found in students12.xsd.
Continue working with your version of students12.xsd.
Elements /school/teachers/teacher and /school/students/student contain data of all teachers and students in the school.
In a lecture, elements teacher and registered-students/student should refer to those records.
You have to modify the definition appropriately:
teacher-id and student-id to the records. (Find TODOs in the schema source.)Look at the examples ns/ns2.xsd – ns/ns4.xsd to see different ways of handling namespaces and prefixes in schemas which provide a target namespace.
Currently all lectures take place in one building, so it is enough to identify rooms by their numbers.
We want to extend our model to allow more than one building.
meeting definition accordingly.