Home > Articles > Web Services > XML

  • Print
  • + Share This
From the author of

Summary

During the course of this article, we built a system that allows users to choose the look and feel for all pages from a single location.

To do this, we created a main page (or main servlet, as the case may be) that checks for two items. First, it checks for a content page to display, and if it doesn't find one, it simply displays the home page. Second, it checks for a style sheet preference. If it finds one, it uses it. Otherwise, it uses the default style sheet.

What we are left with is a system that allows you to add as many pages as you like by creating XML documents that can be transformed using your selection of style sheets. You can choose their style sheet from a single preferences page, and that choice is carried through their entire site-wide experience.

All of these transformations are performed on the server, making it possible for any browser to see the user's preferred layout.

In Part 4 of this series, we will look at the dynamic creation of style sheets. This will enable us to allow the user to decide what content should be part of their mini-portal page, and where it should appear.

  • + Share This
  • 🔖 Save To Your Account