Yahoo web hosting - BC473Chapter 57Application: Transforming XML DataDreams of Other ViewsConfining

BC473Chapter 57Application: Transforming XML DataDreams of Other ViewsConfining the example to just one type of view a table of numbers should help you graspthe important processes taking place. But with the XML data converted to JavaScript objects, you can build many other views of the same data into the same page. For example, a scriptcould completely hide the numeric table, and generate a different one that draws bar chartsfor each sales representative or each region (see Chapter 55 for a scripted bar chart exam- ple). The horizontal axis would be the four quarters, and the vertical axis would be dollars orquota percentages. Clicking a bar opens a small window or layer to reveal more detail fromthe sales representative s record, such as the name of the person s manager. More selectelements can let the user select any combination of subsets of the data in either bar chart ornumeric table form to facilitate visual comparisons. You might be even more creative anddevise ways of showing the data by way of overlapping positioned elements. The point is that despite the kinds of rendering opportunities afforded by the XSL Transformmechanism (even if you can get comfortable in the syntax and mental model it presents toauthors), JavaScript s detailed access to the DOM offers far more potential. Eventually plentyof content authors will mix the two technologies by embedding JavaScript into XSLstylesheets to supplement XSL features. …

Leave a Reply