Welcome

To my corner on the net... Warning, this is a techie blog! Non-techie people may suffer bouts of epilepsy on viewing this blog. The author cannot be held responsible.

XML Part 4

Monday, 7 November 2011

What is the current status of CSS ?
The idea behind CSS was always to create styling for documents and it has been around since the 1970s. Since then it has evolved into a very versatile styling language for web pages. In 1997 CSS Level 1 was published by a working group made up of several working groups such as the W3C. In 1998 level 2 was released which attempted to correct issues in the level 1 version. In 1998 work on CSS 3 was started and it is still ongoing today although CSS3 is widely used.

What is the current status of XSL ?
XSL is also a styling language, however it is used to help display XML rather than work on styling HTML which CSS does. XSL renders the contents of an XML file on a browser. The W3C Working group on XSL started work in 1998.

Extensible Styling Language version 1.1 was last updated December 2010 at w3.org. This specification encompasses an the XML vocabulary and  XSL Style sheets. The latest release of XSL is version 2.0 and XPath is currently at version 2.0. Source : W3C web site



What are the relative merits of CSS and XSL ?
Primarily both CSS and XSL separate the styling of data into a separate file. This feature is very advantageous because styles can be repeatedly used on different data and also because separating styling from data allows you to have organized styling. This added flexibility is certainly the main advantage of CSS. Consistency in styling is also a major advantage of CSS. Using a global stylesheet can help guarantee consistency throughout a project. Documents discussing the merits of CSS also outline speed benefits and efficiency as a merit of CSS. As a style sheet is stored in the browser cache, the styling instructions need not be re-fetched every time and this could potentially be an advantage in terms of loading speed. With today's high speed internet access the benefits could be marginal but the toll on web server performance when a large number of users are accessing the same site simultaneously could be considerable.

CSS also has some disadvantages that are also worthy of note. Experience shows that perhaps the biggest drawback is cross browser accuracy. This phenomenon leads to a lot of frustration in budding developers and can make the learning curve much steeper. When using CSS in development, the lack of support for even the simplest of mathematical expressions and the lack of variable support becomes immediately clear. These features would certainly be handy to calculate column widths, for example. Perhaps the most commonly encountered drawback is the lack of control on vertical placement. Because of this limitation, even simple tasks can become a virtual nightmare and require workarounds. Experience with the current CSS implementation is bound to expose weaknesses and the need for other features such as Declaration of Columns, and element shapes other than simple rectangles.


XSL, is a relatively easy way to process XML data into HTML and that perhaps is arguably it's greatest merit. Furthermore, experience shows that XSL has more solid cross browser support than CSS and many of the inherent browser issues with CSS disappear with XSL. The generic advantages of CSS outlined above are also relevant when considering the merits of XSL as they are after all both styling languages which separate content from style.

Sources : Zimbio, Nwalsh


What are the implications of the concept of the document tree ?



As depicted in the image above (Source:  domscripting.com) the doument tree has only one parent. The first parent, or "root node", is the only element in the tree that has no parents. Elements that are below other elements in the tree as known as "descendants" and "children" are elements with one "parent". Consequently, "parents" can have multiple children and groups of elements that have the same parent are called "siblings".

In XML parsers read through the document tree and place it in memory as a tree data structure inside which every node is representing a document tree element.

The "DOM" or Document Object Model, DOM, is a major standard API for XML parsers

0 comments:

Post a Comment