An interesting second step that takes the modest XML/XSL files and creates a Navigation Menu and multiple Web pages from one XML file by modifying the XSL. This example demonstrates the real power of separating content from presentation.

Sample Web page with navigation produced by the moderate example
What you will learn: How a single XML file can drive multiple HTML output pages and an automatically generated navigation menu — all controlled entirely by the XSL stylesheet.

How It Works

The moderate example builds on the modest approach with two key enhancements:

1. Navigation menu generation — the XSL file reads section titles from the XML and automatically builds a navigation menu. When you add or remove a section in the XML, the navigation updates with no extra effort.

2. Multiple pages from one XML file — the XSL uses conditional logic and parameters to render different sections of the XML as separate Web pages, all from a single source document. This is a fundamental benefit of XML: write content once, present it many ways.

Download Moderate Example Files

← Back to Modest    Continue to the Elaborate approach →