| The XML Site | XML benefits, XSL benefits. |
| XML Site | Articles |
ArticlesBeyond HTML | Benefits of XML and XSL for website authoring
Well, first of all, it doesn't have to be a choice. Certain techniques are appropriate for certain uses, and they often are complementary, with the possibility to be applied at the same time. That being said, XML and XSL/XSLT have certain advantages when writing a website. AdvantagesThe XML family of technologies was created for this purpose: manipulating text. Its syntax and the set of support tools are perfectly suitable to do just that. They are coherent and work well together by design. PerformanceThe web pages are statically generated and not dynamically, per each HTTP request. This allows web servers to serve them faster to the client. The HTML page itself is the product of a transform and not the page on which the development is done. Because of that, it can be optimised for size instead of readability by eliminating white spaces and indentation. This allows for up to 50% smaller HTML pages, while the XML and XSL we edit is still nicely indented and spaced out, easy to read and change. Separated content and codeThe website content is kept in XML files. The code, structure and navigation information is kept in XSL templates. Adding new content to the web site means editing the XML files, while working on the structure and presentation means changing the XSL and CSS files. They are both well defined, disconnected operations. They can be easily done by different people (content writers vs. web designer). Text basedAll content, code and style are stored in simple, human readable, plain text files which can be checked in source control systems. The editing can be done with a wide range of editors. FlexibilityYou can do anything, you have full control. Today's publishing tools are pretty powerful but their power often comes at the expense of customisability. XSL/XSLT lets you control every single aspect of your website's creation. There is no need to change weird templates, to learn a new syntax for each new tool. That's power. DisadvantagesIt does not address the dynamic website scenario. An application server type of framework has to be used in this case. But they can be used complementary. Adding PHP code into the generated HTML pages is trivial. Read on: XML and XSL tools and documentation. First Posted: September 3rd, 2005 - Saturday. |