XML - Managing Data Exchange/The one-to-one relationship/Exercises
4. The one-to-one relationship
- Create an XML schema to describe the most popular restaurant in a city. Use either the all order indicator or the choice order indicator in your schema. Check that it is well-formed and valid.
- Using the schema, create an XML document and populate it with data for one city that has a most popular restaurant as well as two or more other restaurants. Check that it is well-formed and valid.
- Write an XML style sheet to display the most popular restaurants sorted by name if the restaurant is located in a city with population > 5,000.
- Create and XML schema to represent the most popular professors at a university. Include first name, last name, and years teaching.
- Using the XML schema, create and XML document and populate it with data about a university and its most popular professor. Use at least three universities and two professors at each university.
- Write and XML style sheet to display the most popular professors at each school sorted by the professor names.