Separating content from design
Using XSLT separates the content from the design. This
has many benefits which should be well known to WSG members.
- it encourages consistent design
- it simplifies site development and maintenance
CSS does not separate content from design
Contrary to popular belief, CSS does not separate content from design; it does remove the formatting and positioning elements of the
design from the HTML code, but the webpages still contain layout instructions.
Worse still, even well written HTML often contains redundant code for a specific purpose;
an obvious example is menus that use a <ul>, <li>, <a> tag structure to accomodate screen readers.
True separation requires the webpages contain content and only content. All layout and formatting elements must be kept in the design layer.
XSLT allows true separation of content from design
When using XSLT to generate the HTML, the webpages are pure XML data containing no layout or formatting code.
All design related markup is kept in the XSLT files.
This is true separation of the content from the design and it carries with it some additonal benefits which cannot be achieved with CSS alone:
- every page has consistent layout code
- every page has consistent design elements
- it is much easier to write valid HTML
- multiple site designs are possible
- site redesigns are easier
As an added benefit, the webpages containing the content are concise and clear.