Styling XML using CSS and XSLT

In order to begin styling XML documents, a basic understanding of CSS and HTML (or XHTML) is recommended, but not required. In fact, today many sites that run on blogging software like WordPress can generate XML feeds (commonly used with RSS and ATOM readers) automatically, and there are certainly enough tutorials online to get anyone with even a basic understanding of the web started on the path to becoming a designer.

The good thing about web design (and the web in general) is that for all it’s power as a new medium of expression and communication, it exists in a relatively static state. And although in reality the web is constantly changing, you can usually get back to a web page after about a week and it will look mostly the same. This constraint can make for an excellent learning environment that is conducive to experimentation via trial and error, and the developing of a creativity that is essentially self taught. Incidentally, there is currently a new technique being put forward known as Web 2.0 that aims to take the web to new levels, by using a combination of programming languages to make the user’s experience a more dynamic one. More information on that topic can be found in a previous post entitled: Web 2.0 – Where are you?.

Anyway, the xml feeds that WordPress creates for RSS syndication are a good place to start testing out some basic skills in CSS. There is an article called Giving Style to XML that does a good job of describing how to create and include some basic CSS code in an XML document.

Some limitations with using css are: (taken from the previous article)

  • Reordering and sorting of elements is not possible
  • Generation of text is hard (or not practical)
  • Adding functionality, such as creating a link from certain content elements, is not possible

Solving some of these shortcomings requires the use of XSLT. Now this is one of the coolest languages i’ve seen for the web. Actually, XSL is a family of languages of which XSLT (Extensible Stylesheet Language Transformations) is a major part. Read more about this on the W3C site. The article Using XSLT for Adding Style does a good job of walking you through the process, picking up from where the previous article on designing with CSS left off. For a complete review visit: W3c Schools – XSLT Tutorial.

Comments 1

  1. teapigs wrote:

    Outstanding web site below! In addition your website a lot right up fast! Exactly what number do you think you’re applying? Should i buy your affiliate marketer weblink in the number? I’d prefer this site jam-packed up as promptly seeing that the one you have hahah

    Posted 03 Aug 2013 at 6:11 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *