Chapter 11: Case Study: A Family Tree


Overview

This chapter presents our second case study. Whereas the XML in the previous example fell firmly into the category of narrative (or document-oriented ) XML, this chapter deals largely with data. However, as with many data-oriented XML applications, it is not rigid tabular data, rather it is data with a very flexible structure with many complex linkages and with many fields allowed to repeat an arbitrary number of times; the data can also include structured text (document-oriented XML) in some of its elements.

The chosen application is to display a family tree, and the sample data we will use represents a small selection of information about the family of John F. Kennedy, President of the United States.

Because genealogy is for most people a hobby rather than a business, you may feel this example is a little frivolous. I think it would be a mistake to dismiss it that way, for several reasons:

  • Genealogy is one of the most popular ways of using the web for millions of people. Catering to the information needs of consumers is a very serious business indeed, and whether consumers are interested in playing games , watching sport, making travel plans, or researching their family trees, the web is in the business of helping them to do so. Genealogy is one of the few areas where web sites have built financial success by asking consumers to pay for content.

  • Genealogical information presents some complex challenges in terms of managing richly structured data, and these same problems arise in many other disciplines such as geographic information systems, criminal investigation, epidemiology, or molecular biology. Data that fits neatly into rows and columns , to my mind, isn't interesting enough to be worth studying ; and what's more, it's likely that the only reason it fits neatly into rows and columns is that a lot of important information has been thrown away in order to achieve that fit. With XML, we can do better.

  • To write the application shown in this chapter, we have to tackle the problems of converting from non-XML legacy data formats to XML formats, and from one XML data model to another, which are absolutely typical of the data conversion problems encountered in every real-world application.

I could have used an example with invoices and requisitions and purchase orders. I believe that the techniques used in this worked example are equally applicable to many practical commercial problems, but that you will find a little excursion into the world of genealogy a pleasant relief from the day job.




XSLT 2.0 Programmer's Reference
NetBeansв„ў IDE Field Guide: Developing Desktop, Web, Enterprise, and Mobile Applications (2nd Edition)
ISBN: 764569090
EAN: 2147483647
Year: 2003
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net