--------------------------------------------------------------------- XQuery --------------------------------------------------------------------- 1. How many countries are in the Mondial file? --------------------------------------------------------------------- --------------------------------------------------------------------- 2. Which is the country with the smallest population in Europe? --------------------------------------------------------------------- --------------------------------------------------------------------- 3. Return an alphabetically sorted list of all continents, where a continent element has an attribute "name" and no other content. --------------------------------------------------------------------- --------------------------------------------------------------------- 4. Extend the previous query such that also the number of countries on a continent is returned. --------------------------------------------------------------------- --------------------------------------------------------------------- 5. Modify the previous query so that it returns the continents in alphabetical order and, for each continent, the name of the country with the largest population and the population of that country. --------------------------------------------------------------------- --------------------------------------------------------------------- 6. Return an alphabetically ordered list of religions, together with the number of members of that religion. --------------------------------------------------------------------- --------------------------------------------------------------------- 7. Refine the previous query so that for each religion the total number of members is given as well as the number on each continent, provided the number is not 0. --------------------------------------------------------------------- --------------------------------------------------------------------- 8. Return for each continent the names of those organizations, where the name of the continent is contained in the name of the organization. --------------------------------------------------------------------- --------------------------------------------------------------------- XSLT --------------------------------------------------------------------- 1. Write a script that returns a list of all cities in the document, ordered alphabetically. Each city element in the result will contain the name of the city and the name of the country to which it belongs, but no other information. Note that the cities in a country are not always immediately below the country element but may as well be nested in a province element. --------------------------------------------------------------------- --------------------------------------------------------------------- 2. Write a script that returns a list of all cities in the document for which the last population count was greater than 100,000. (Note that some cities have no population elements while others have more than one, if data are available for several years.) Each city element in the result will contain the name of the city, the last population number, and the name of the country to which it belongs, but no other information. The cities will be ordered according to the population number, in descending order. Cities with identical population will be ordered alphabetically. ---------------------------------------------------------------------