Once I was making a new design for the old site. It was about 20 html pages. I made the design in the graphic form. Then I made one html template for all pages. About a week I was pulling old content into the new design. After it I saw that the design is not good well in some details. So if I changed some details in the page design I had to change all 20 pages. I decided to simplify this process by dividing each page into three parts: header's content, menu's content and content itself. Then I could merge these individual parts for each page with common parts for all pages. And if I wanted to change something in design, I changed only common part in one file and then ran the command file that merges those page parts. So I was able to change the design for all pages quite quickly.

It was better than nothing but I decided to use some way, based on industry standards and I have remembered about XML/XSLT, those I learned some time before. Using of XML, allows to divide page content from the page representation. I looked through that site pages and estimated the elements (in XML terms) from which they was consisted of. Then I made the .XSD file with description of document structure in XML Schema Definition language. Then I made xml pages from their html originals that contained only data, no representation. Then I made .XSL file was describing XSLT (XSL Transformations) to translate XML documents in HTML ones. Namely the .XSL file contained all the representation logic.

I do not want to show some basic examples of how to make some beautiful variants of html pages for books catalog from XML documents that contain "author" and "book" tags. I also do not want to describe XML, XSLT, etc. I just want to show how you can use XML to make your sites in more efficient way.

After my experiment with XML I found that it is very easy to dramatically change overall site design. Also I found that once I made .XSD and .XSL files it easy to reuse it for making any other sites. In my opinion, using XML, grows up the speed of the site development and maintenance and reduces the time of boring work. Also, using XML, strictly control the overall site design line. Probably it is better to use some standard document type definitions that describe structure of your documents, DocBook for example, instead of making your own.

Microsoft Internet Explorer 6 and higher is able to show XML documents with attached XSLT Transformations. So your XML pages can look like their HTML analogs. But not all browsers have such XML support. That is why I transform my XML documents into HTML and then put them to my site.

There are some pages from my site in XML:
(If your browser shows these pages well, it may be interesting to view a source text of the page you see.)

bf3.xml
ebay.xml
index.xml
index_en.xml
oliva.xml
oliva_en.xml
softirq.xml

There are XML schema definition and XSLT files:

ci.xsd
ci.xsl



For XSLT Transformations I use Command Line Transformation Utility (msxsl.exe).

There is a command file to translate XML pages to HTML:

dir /b *.xml > list.txt
FOR /F "tokens=1 delims=." %%i in (list.txt) do msxsl %%i.xml ci.xsl -o %%i.htm –xw

Last modification date is: 23-December-2003