398 CHAPTER 13 CASE (Apache web server for windows) STUDY: USING PHP

398 CHAPTER 13 CASE STUDY: USING PHP FOR AN XML APPLICATION The application uses the following template for the XML document built from the database content:
The document element is . The element specifies the user s current position in the navigation system. The element contains a
element. This element specifies the links from this level. The element also contains a list of elements, one for each navigation item at this level. An XSLT stylesheet uses the values in the elements to create the links to the subsequent levels of navigation. The structure of the XML document built by the application needs to take into account the following scenarios: 1. There are no subnavigation items to display. 2. The values in the querystring change and cause an error. 3. There are subnavigation items to display. The last scenario is the most likely, but I ll look at the XML structure that the application needs to produce for each option. Scenario 1: No Subnavigation Items The first situation I ll look at is where the users have reached a point in the navigation where there are no subnavigation items. A sample XML file structure for this scenario follows: WA
city
In this structure, I ve navigated to Western Australia (WA), a state in Australia. The element shows that I m in an areacalled WA. However, the element doesn t contain tags, as no cities are specified within the area. Scenario 2: Changing Querystring Variables Users might change the values in the querystring, perhaps changing one of the variables to see what happens. Let s assume that the URL to generate the XML document in scenario 1 was http://localhost/weather/index.php?continent=1.
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Leave a Reply