Getting Started: Elaborate Approach
Here's something closer to a real-world example that combines multiple XML files and XSL files to control the content, presentation, and maintenance of Web pages. This approach reflects how a production XML-based Web site is typically structured.
How It Works
The elaborate example introduces the separation of content and presentation across multiple files:
Multiple XML files — content is distributed across several XML files, each representing a logical section of the site (e.g., navigation, page content, site metadata). This mirrors how a real content management system organizes information.
Multiple XSL files — separate stylesheets handle different
aspects of the presentation. One XSL file may control the overall layout and navigation,
while another handles the detailed formatting of content sections. XSL import
and include directives allow stylesheets to share common rules.
Maintenance benefits — because content and presentation are fully separated and modular, updating the site's look requires changes only to XSL files, while adding new content only requires editing XML files. Neither change affects the other.
Download Elaborate Example Files