Understanding the Technology
Use of Style Sheets (CSS) and (X)HTML and XSLT Templates
A website will normally have be designed to have a consistent look and feel throughout the entire site. To ensure that this is look is caried through the entire site a central pool of files or 'Templates' are created and are used by every page on the site. This approach means that if at a later date the site is redesigned or needs to modified only a few files need to be changed to apply the changes to the entire site
(X)HTML and CSS
For a web page to work it will usually have two parts the (X)HTML which provides the content and the CSS which describes the style of the page. The XHTML usually contains the page text, where the images are held and extra information used by the search engines. The CSS usually describes things such where this information is displayed and what size and colour the fonts are.
For each website we may have to produce at least three different style sheets (CSS)which can be used by different pieces of hardware to display the website (X)HTML differently. These style sheets are usually
- Web browser style sheet is the standard style sheet displayed in your browser such as internet explorer or firefox
- The printer style sheet may display a different copyright notice and may not display the menus as they are are not needed when printing out
- A stylesheet for a PDA will usually try and display a much smaller and more efficient version of the site.
- XSL is a W3C Recommendation - The World Wide Web Consortium (W3C) create the standards that the web operate on (such as HTML and CSS). They recommend XSL and XSLT (XSL transformations) as the best language for managing XHTML and XML documents.
- XSL is cross browser dependant - XSL can work with any language or operating system so if there is a need to use the template with another system then it will support XSL
- Browsers such as Internet Explorer understand XSL - All modern browsers can understand XSL templates meaning that it would be possible to get your browser to use the template and create the website. No other templating language has this flexibility
- XSL is very fast - XSL is one of the most efficient templating languages meaning that it can produce web pages very quickly even on the fly.
XSLT Templates
Templates are used to make the website look and feel consistent. All quality websites are built using templates so that changes to the site in future can be easily made by updating the template. It is much easier to make one change to a template rather than have to change every page on a website.
We will build a single template file which will produce every XHTML page on the site. We use XHTML as it is the most flexible and future proof version of HTML We use eXtensible Stylesheet Language (XSL) for our templates to produce websites for a number of reasons
Aniccas web site solution will encode its pages as XML data as this provides the most flexible solution for transfering data. The XSL template will then transform this XML data into XHTML which web pages are coded in. Once produced this pages are then cached on the webserver until they are updated, thus producing a very fast and adapatable web site.
More Info on XSL
More on XHTML