Getting Started with XSL(T)

Getting Started with XSL(T)

In this tutorial, we will adventure into the world of XSL(T) and explain what it is, how to pull data from an XML document, basic iteration and basic login and conditional statements.

Tutorial Details

  • Program: Any Text Editor
  • Version: 1 of 1
  • Difficulty: Medium
  • Estimated Completion Time: 25min

Overview

Sometimes, you have huge datasets that are parsed out as XML that need to be formatted so that someone who doesn’t know how to read XML can read the data. In this tutorial, I will show you how that is done with the power of XSL(T).

What is XSL(T)?

XSL(T) is short for Extendable Stylesheet Language (Transformation). Even though it is a “stylesheet,” it has a different goal than CSS (Cascading Stylesheets). XSL(T) is not used for visual effect, but instead extracting data (or transforming) from XML and using the combination of HTML and CSS to format them. XSL(T) also has the dynamic properties in the sense that you can do iteration and conditional statements upon a static XML file.

XSL(T) is not used for visual effect, but instead extracting data (or transforming) from XML and using the combination of HTML and CSS to format them.

Why use XSL(T)?

XSL(T) can be used for organizing large trees of XML so that anyone can read it. For instance a Google Search Appliance serves up queries as XML. For that XML to be read by a general user some transformation has to occur. This is where XSL(T) plays a vital role. It could also be used to style an RSS feed page since the source is all in XML. It is also used as the main templating language for Autonomy’s Teamsite (EMS) and such open source CMSs as Symphony.

XSL(T) also cuts down on server load. Since XSLT can do the transformation on the client side, your server has to do less work, since you are not querying upon data in database. JavaScript and server-side functions can be setup to tell the document to use a specific XSL(T) template or you can source the template within the actual XML file. For this tutorial, we are simply going to source the XSL(T) template in the XML file.

Getting Started

Our goal is to create a listing of vacations that we want to go on, and perform some logic on the data to let us know what destinations are out of our price range. In this case our budget is $999 for our vacation and we are going to indicate when the price is over our budget. We will also be ordering them in descending order so we can see right away what trips are out of our budget.

First off you are going to need an XML file. Go ahead and open your favorite text editor and create a new file and call it trips.xml. I have provided a sample XML file you can download and use or you can copy and paste in the code below.

	<?xml version="1.0" encoding="ISO-8859-1"?>
	<vacation>
		<title>My Vacations</title>
		<trip date="03/01/10">
			<country>USA</country>
			<state>Florida</state>
			<city>Orlando</city>
			<price>1000</price>
		</trip>
		<trip date="04/01/10">
			<country>USA</country>
			<state>Michigan</state>
			<city>Detroit</city>
			<price>600</price>
		</trip>
		<trip date="02/03/2010">
			<country>Spain</country>
			<city>Madrid</city>
			<price>5000</price>
		</trip>
		<trip date="05/01/10">
			<country>USA</country>
			<state>California</state>
			<city>San Jose</city>
			<price>800</price>
		</trip>
	</vacation>

The first and only thing we will need to do to this document is to add a reference to where our .xsl file lives. In this instance we will be creating a stylesheet called trips.xsl.

		<?xml version="1.0" encoding="ISO-8859-1"?>
		<?xml-stylesheet type="text/xsl" href="trips.xsl"?>
		...
	

Beginning The Extendable Stylesheet

Start by creating a new document in your favorite text editor and saving it as trips.xsl. Next we can start the actual stylesheet .You will first need to specify the XML version and encoding for the template. If you are familiar with XML, it is the same version and encoding syntax

		<?xml version="1.0" encoding="utf-8"?>
		...
	

From here we can dive into writing some XSL. To start the stylesheet we must first let the browser know that we are using an XSL stylesheet and what version. This element must wrap all of your mark up and should be closed out at the end of the document otherwise the document will not transform.

			<?xml version="1.0" encoding="utf-8"?>
			<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
			
			<!-- More stuff to come -->
			
			</xsl:stylesheet>
			...
	

If we are going to want to validate the XHTML within our document against W3C standards we then will need to include a doctype to use upon transformation and render. Here we are going to use the XHTML Strict DTD. We do this by setting up a self closing element called xsl:output. With in that element we will call the doctype.

		<?xml version="1.0" encoding="utf-8"?>
		<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
		<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
		
		<!-- More stuff to come -->
		
		</xsl:stylesheet>
		...

Next, we will start the actual template. In between the template open and close tag is where all of out XHTML will go along any other XSL(T) elements. It is important to note that you have set a match for the template. This attribute basically says go to the root of the XML document.

		<?xml version="1.0" encoding="utf-8"?>
		<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
		<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
		
		<xsl:template match="/">
		
		<!-- More stuff to come -->
		
		</xsl:template>
		</xsl:stylesheet>

Transformation

First thing we need to do now is start up a basic XHTML layout and nest that within our xsl:template tags. I also have linked a css file to document to give the document some style but setting that up is beyond the scope of this tutorial.

	 
		...
		<xsl:template match="/">

		<html>
			<head>
				<title></title>
				<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
			</head>
			<body>
				
			</body>
		</html>
		
		</xsl:template>
		...

So our first goal is to take the title element from the XML document and place that data into the title of the html document.

XmlTitle

Before we we start with the XSL it is important to note where within the XML tree “title” exist. In this case title is a direct descendant of the root element of vacation. We can now start to writing our XSL. To be able to tell the browser where a matched piece of data is going to live we use the xsl:value-of element.

We are in the root of document already through the xsl:template tag but we must dig deeper into the XML tree to select the data we want. In this case we are going to look in the document for a root element of vacation with child of title.

	...
	<head>
		<title><xsl:value-of select="vacation/title"/></title>
		<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
	</head>
	...

When we go to open our XML file (trips.xml) in the browser our result is the title element being displayed in title bar of the browser, where we would expect it to be in a normal XHMTL based site. Also notice we no longer see the XML tree structure, however when we view source we see that the source of the document is XML.

BrowserTitle

We can take it one step further to prove that the transformation from XML to XHTML has occurred in the browser by using a tool like FireBug or Safari Inspector.

Inspector

To add some visual organization I am going to add some markup so that our data is a little bit more easily to look at.

	...
	</head>
	<body>
		<div id="wrapper">
			<div id="trips">
				<h1><xsl:value-of select="vacation/title"/></h1>
					<ul>
						<li></li>
					</ul>
			</div>
		</div>
	...

As you can see above, I have reused the title element once again but this time in the body of the document. This can be extremely useful in the re-use and repurposing of content.

Next, we are going to want to transform our “trips” into XHTML. Common sense says that we should just be able to call another xsl:value-of but this time calling upon the child node of “trip”. This would work if we only had one trip. However since we have multiple trips we need to do some iteration or looping through the XML document.

Iteration aka Looping

As in all programming languages there is iteration statements that loop through a specific dataset and performs some methods on them. XLS(T) has similar functionality in extracting data from an XML document.

	...
	<xsl:for-each select="vacation/trip">
	...
	</xsl:for-each>
	...

The snippet above does pretty much what you would expect it to do. It is saying xsl:for-each element select all that exists at the path vacation/tip.

However, to actually extract the data we need to do a little more work. Since our budget for the trips are $999 we are going to have to preform some logic on the data. But before we do that lets sort the data by price in descending order.

Sorting

	...
	<xsl:for-each select="vacation/trip">
		<xsl:sort select="price" data-type="number" order="descending"/>
		...
	</xsl:for-each>
	...

As you can see above sorting data by a specific node is fairly easy. Since the xsl:for-each statement selects the trip node and sets the scope we can simply tell xsl:sort to select the price node and look for the data-type number then set the order to descending. It is important to note that the xsl:sort statement is self-closing (< />).

Previewing

Well at this point you may be wondering what this vacation listing looks like. To preview what we have open trips.xml in your browser. Make sure you are not viewing the .xsl file.

Preview

You are probably scratching your head wondering why we don’t have any results. This is because we have not sourced what data to look at. The xsl:sort statement is not sourcing data it is simply a filter for when data is present.

Choosing and Testing

Since we want to give some indication for prices that are out of our budget we need to Test against some parameters. We do this with the combination of xsl:choose, xsl:when test=” and xsl:otherwise. If you have any programming experience you should recognize this concept of flow control of conditionals. If not it’s still pretty simple to follow.

		<xsl:for-each select="vacation/trip">
			<xsl:sort select="price" data-type="number" order="descending"/>
				<xsl:choose>
					<xsl:when test="price > 999">
					BLAH
					</xsl:when>
					<xsl:otherwise>
					BLIP
					</xsl:otherwise>
				</xsl:choose>
		</xsl:for-each>
	

We start the logic flow with xsl:choose, this is going to initialize the statement similar to if in languages like PHP. Directly after that we have our first test. We are telling XSL(T) to that when the price is greater-than(>) 999 do BLAH, otherwise do BLIP.

Next we need to replace BLAH and BLIP with hooks to our XML.

		...
		<xsl:choose>
			<xsl:when test="price > 999">
				<li class="too-much">$<xsl:value-of select="price"/> <xsl:value-of select="city"/>, <xsl:value-of select="state"/> <xsl:value-of select="country" /> <em><xsl:value-of select="@date"/></em> </li>
			</xsl:when>
			<xsl:otherwise>
				...
			</xsl:otherwise>
		</xsl:choose>
		...
	

In the above snippet we setup up our list item with a class of “too-much”. This class will color the trips that out of our budget in red. We then are using xsl:value-of to grab the price, city,state,country and date. It is important to note that the date can be access from the each “trip” node by using the @ symbol. These same type of statements were seen earlier when you got the title for our list. We have also added the dollar symbol ($) and comma ( ) to format the data correctly.

	<xsl:choose>
		<xsl:when test="price > 999">
			<li class="too-much">$<xsl:value-of select="price"/> <xsl:value-of select="city"/>, <xsl:value-of select="state"/> <xsl:value-of select="country" /> <em><xsl:value-of select="@date"/></em> </li>
		</xsl:when>
		<xsl:otherwise>
			<li>$<xsl:value-of select="price"/> <xsl:value-of select="city"/>, <xsl:value-of select="state"/> <xsl:value-of select="country" /> <em><xsl:value-of select="@date"/></em> </li>
		</xsl:otherwise>
	</xsl:choose>

We next have to state what we want to happen to the other items if they meet our constraint of under $999. In this case we are just going to print them out in a list item with no special class attached to them. We are going through and selecting all of the same nodes as we did for the too-much nodes (price, city,state,country and date).

Putting It All Togeather

	<?xml version="1.0" encoding="utf-8"?>

	<xsl:stylesheet version="1.0"
	                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

		<xsl:template match="/">
		<html>
			<head>
				<title><xsl:value-of select="vacation/title"/></title>
				<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
			</head>
			<body>
				<div id="wrapper">
					<div id="trips">
						<h1><xsl:value-of select="vacation/title"/></h1>
							<ul>
								<xsl:for-each select="vacation/trip">
									<xsl:sort select="price" data-type="number" order="descending"/>
										<xsl:choose>
											<xsl:when test="price > 999">
												<li class="too-much">$<xsl:value-of select="price"/> <xsl:value-of select="city"/>, <xsl:value-of select="state"/> <xsl:value-of select="country" /> <em><xsl:value-of select="@date"/></em> </li>
											</xsl:when>
											<xsl:otherwise>
												<li>$<xsl:value-of select="price"/> <xsl:value-of select="city"/>, <xsl:value-of select="state"/> <xsl:value-of select="country" /> <em><xsl:value-of select="@date"/></em> </li>
											</xsl:otherwise>
										</xsl:choose>
								</xsl:for-each>
							</ul>
					</div>
				</div>
			</body>
		</html>
		</xsl:template>
	</xsl:stylesheet>
	

By this time we should actually have something useful to look at in the browser.

Finished List

Open up trips.xml like before. If all has gone well you should have something similar to what is shown above. XSL(T) is a very powerful language that allows you to drastically change how XML data is presented. Below are some resources to learn more about XSL(T).

Write a Plus Tutorial

Did you know that you can earn up to $600 for writing a PLUS tutorial and/or screencast for us? We’re looking for in depth and well-written tutorials on HTML, CSS, PHP, and JavaScript. If you’re of the ability, please contact Jeffrey at nettuts@tutsplus.com.

Please note that actual compensation will be dependent upon the quality of the final tutorial and screencast.

Write a PLUS tutorial

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://beautifulemails.com Mohammad Koubeissi

    This is amazing! – Could we get a screencast?

  • http://www.al-music.com Antonio Lopez

    yesss!!! the timing is perfect! many thanx! i’ve just started with http://symphony-cms.com/

  • http://jelmerdemaat.nl Jelmer de Maat

    Didn’t know about this, thanks for sharing!

  • Reader

    Yeah, cool tutorial!
    I want to see more about topics like that!

  • Jedrek

    It’s good subject. I want more!

  • http://flickr.com/photos/kibondo Vegar

    This is a good subject, particularily with Symphony CMS using XSLT. I discovered Symphony the other day, and it’s a fantastic CMS from what I’ve seen so far. I strongly hope someone will write up a little tutorial about Symphony in particular later.

    Not to say this isn’t a great tutorial on its own, ’cause it is. Good to see someone writing about something other than HTML5, CSS3 and PHP-based stuff. Two thumbs up!

  • Le Bescond

    Good stuff ! Big potential

  • Mike

    I used XSLT quite a lot last summer on an internship. It’s useful stuff!

  • http://www.newarts.at Drazen Mokic

    Thanks for that, since i am in the army i hardly get up to date ;/

  • http://looselyrelated.com Jim N.

    Chris,

    I did an XSL fragment last week to pull in a cms generated feed and it works everywhere except FireFox (of all places). FF is escaping the output contrary to what (I thought) I instructed it to do:

    xsl:value-of select=”content:encoded” disable-output-escaping=”yes”

    I’ve had my js ninja go over it and currently my CF guy is looking at it, but everyone is dumbfounded. Any thoughts on the matter or recommendations where I might go to find out why FF isn’t playing nice? Many thanks.

  • http://bloggerzbible.blogspot.com/ Bloggerzbible

    Very nice tutorial.thanks

  • http://www.seowisedesigns.com Yheng

    This is a great tutorial! I wonder if there’s a screencast tuts for this, more demonstration please!

  • curlybub

    Thank you for this!

    Im having a hard time dealing with xslt when using umbraco. This lessens it somehow. ;D

    Again thank you!

    • AmirKhan

      our.umbraco.org is a great resource for you. Post your questions in the forum, you will get TONS of help from other users.

  • Helen

    Why is it impossible to style a simple feed-xml-file directly with CSS to make it look right in Firefox? I tried this tutorial like many before. FF just ignores all of this …

    • http://chadwik.us chad
      Author

      It’s because the RSS is being served up by a third party app like feedburner. If you were creating a feed on your own you could manipulate the data and how it looks with XSL(T). Not sure why you are having problems with FF, are you opening the XML file?

      • Martin

        Same problem here in FF and Opera – working fine in IE

  • http://www.newoutlet.com/ Wai Phyo Han

    Awesome!
    Thanks for this article!

  • http://www.viking-tech.ro Victor

    This works great while learning XBRL :D

  • Zolika

    Great tut.. thanx.

  • http://bleddz.com Adel

    Amazing tutorial

  • http://www.gwr.co.nz Glen Robertson

    Wow that’s so cool. I always wondered what XSLT was. Cheers!

  • Marcin

    And what happened to the object-oriented JS that was posted here a few hours ago and now disappeared?

  • http://sonergonul.com Soner Gönül

    Thanks !

    That’s very useful !

    Cool !

  • http://www.jeba.in Jeba

    Neat! liked it very much..

  • http://www.iamwebsitedeveloper.com Evan Shajed

    Thanks for this informative.. data it help beginners a lot

  • http://friendfeed.com/u0421793 Ian Tindale

    1: The translation into correct English isn’t up to acceptable quality standards for publishing.

    2: You should hint at at least the snippet of CSS rules required to make the overpriced list items actually appear red, even if you don’t go the whole hog and write an entire CSS style sheet – the reader might wonder why theirs isn’t appearing red despite your insistence that it will be.

    3: the xsl:sort line with a data-type attribute of a value of “number” – how does any of this actually know that it is a number data-type in the source xml?

    • James

      Let me help the author out here..

      1. No comment, however, as most of us aren`t natively speaking English anyway, we don`t care.

      2. Why? As he mentioned, going in to CSS is way out of scope here, read the code, and you will see that he uses a css class “too-much” for the marking.
      Give it a nice background color, and tadaa, you`re done!

      3. True, but may that as it be, XML was DESIGNED to make your OWN formats, so if you want it to be nummeric, it will be. AND if you look into the XSLT documentation, you can see that the “sort” attribute allows for multiple sorting options, and with that said, every sorting option has it`s own handling. Some return errors, some return NULL values.

      If chosen for sorting by number, XSLT ( the parser ) will check for the values. If the values of the current node are matched as nummeric values, it returns true, if not, it returns false, hence skipping the ones where there is no number.

      Now, my only comment on this tutorial is: scope. Scope is so important in XML and XSLT, however, to fully understand it ( and in particularly XSLT ) you must know what it all means, how the scope changes once you use and for-each statement, and what else more. I know i had major issues figuring out how the scope works in different templates ( master templates and follow-up templates) .

      And a decent explanation on how match works, would be nice to add. Fortunatly, i know these things now, but many people don`t, so in the future, please do post something about that too!

      • oconn96

        He could have at least attached his style sheet or a demo of it so we could take a look at his css.

  • Alain Sips

    Very nice tutoral! Makes XSLT very comprehensible

  • http://nick-dunn.co.uk Nick

    If you want to play with XSLT more, I highly recommend Symphony CMS (http://symphony-cms.com) as mentioned in the tutorial. Using XSLT as the templating layer just feels *right*.

  • http://bsidedesigns.net/ Lakeshia Burnside

    I needed this in my life thanks! We use XSLT at work and although i know how to read/edit it i never knew how it worked!

  • DDetto

    I live a good part of my day in the MS Sharepoint Dungeon of Dispair so I am often stretched on the torture rack of XSL(T).

    A few weeks ago I was looking for such a Tut. This will be really helpful.

    How about a good tut on CAML next?

    Thanks!

  • http://www.jordanwalker.net/index.php Jordan Walker

    Great write up, have not seen much on here about XML variants.

  • http://joeyreed.com Joey Reed

    Thanks for opening my eyes to XSLT, Chad. I had no idea what it meant before and, honestly, I just didn’t have room in my brain to learn another acronym :)

    However, this tutorial is an excellent guide to beginning XSLT, and now I look forward to learning more!

    By the way, can you use PHP to write/insert XSLT into a page? Is it common to use languages like this together? Anyone want to recommend how I could learn to integrate the two, if possible?

    • http://www.tk3.co.uk Ryan Gillett

      You could get the PHP to output the XSLT to a file on the server, and then use PHP to echo some javascript to redirect to that file (document.location.href=’file.xsl’).

  • chichibek

    exelente, gracias por las ideas

  • http://www.fazalkhan.co.uk Fazal Khan

    Brilliant tutorial! This compliments Symphony CMS perfectly – By far the best open source XSLT CMS around.

  • http://www.satishz.co.cc/fun.html Satish

    Thanx for tut…….

    NET.tut+ \m/

  • Ray

    Awesome, thanks so much. I came to web tuts looking specifically for a XSLT tutorial and it just so happened that this was the most recently published article.

  • http://valorsite.com Martinho

    NIce, I haven´t read it at all. I´ll read it later cause it will help me in my future project.
    Thanks for the tut

  • http://www.joshnichols.com/ Josh N.

    I have to second trying Symphony CMS (http://symphony-cms.com) after getting the hang of this tutorial. An excellent CMS and XSLT is *perfect* for building templates in a CMS.

  • http://chadwik.us Chad
    Author

    I’m glad you guys liked it =]

  • http://greystate.dk Chriztian Steinmeier

    Just a minor correction: The X in XSLT actually stands for “Extensible” – not “Extendable” :-)

  • http://rainerborene.com/ Rainer Borene

    It would be great to see more tutorials here about Symphony CMS.

  • http://spotdex.com/ David Moreen

    Just great, I might just try this for some of the people that I work with, there servers don’t support and languages that I know.

  • http://www.wink.com.mx nahum

    Why use XSLT ????

    JSON is a lottttttt!!!! better and easy to understand also to implement. what do you think about JSON??

    • David Wortham

      JSON and XSLT serve completely different purposes. JSON and XML are JSON is extremely good if you want flexibility; XML is extremely good if you want rigid adherence to data rulesets (that is the purpose of the DTD).

      JSON certainly has its strengths (most data can ber serialized in an extremely common format), but JSON does not handle presentation (as does XSL and HTML). XSL(t) is the act of transforming XML+XSL into another format like HTML.

      Another thing to mention is that XSL style sheets are assets which can be cached on the browser and they can include other XSL style sheets (in an awesome form of recursion). You can cache the 90% of layout markup that is common to all of your pages on the browser so the response is smaller and leaner.

      One fantastic example of XSLT usage was Blizzard’s Starcraft2 website (although it seems to have been reverted to XHTML). It used UA sniffing to detect if your browser could display XSL(t). That site primarily used XSL(t) to abstract readable text out of the layout so localization was incredibly easy and scalable.

  • http://www.nouveller.com/ Benjamin Reid

    This seems a good alternative to PHP parsing (but then again there is Simple Pie) but when PHP isn’t available I might give this method a go.

    I like the markup too! Thank-you’s!

  • http://www.tariqit.com Tariq Mahmood

    Thanks for great article

  • razvantim

    Great tutorial. Hope in the future XSLT will be discussed here.

    For more XLST functions check here http://www.w3schools.com/Xsl/xsl_functions.asp

  • razvantim

    Great tutorial. Hope in the future XSLT will be discussed here.

    For more XLST functions check http://www.w3schools.com/Xsl/xsl_functions.asp and http://symphony-cms.com/download/xslt-utilities/date-and-time/

  • Arthur Corenzan

    Take a look at http://www.blizzard.com and their game’s sites, most of them are made using XML/XLS.

  • http://www.milesj.me Miles Johnson

    We use XSLT at work and I have got to say its just terrible. Its slow, its restrictive, you cant do many things you would be able to do with basic template engines (PHP, etc).

    On top of that, you need special cases for IE and other browsers, and it causes Firebugs console.log() and other commands to not work.

    • http://www.freshclickmedia.com Shane

      That’s interesting Miles – I’ve used XSLT quite a bit (though not for a year or so), and didn’t find it to be slow at all. I’ve never not been able to do something or another with XSLT, though it does take a little getting used to.

      Although this article deals with the simplest example (referencing the XSLT from within the XML document), server-side processing is probably the most common way of using it, and I didn’t have any issues with it all. I guess each of us has their own preferences for technologies, and I have to say that I do love a bit of XSLT :)

    • http://nick-dunn.co.uk Nick

      I’m surprised you say it’s slow — I’ve found the processing even of large XML trees to be extremely quick. I’m with Shane in that I’ve never found something in XSLT that I haven’t been able to do. Sure, you don’t get regular expressions or a billion string manipulation functions out of the box, but you can register PHP functions (if you must).

      Client-side XSLT is always going to be shaky. I imagine it is implemented across the browsers just as inconsistently as CSS *is* and JavaScript *was*.

      Using it server-side is a dream, however. With Symphony CMS each page request produces a single XML tree (page metadata, content from the database queries) that is then run against the corresponding XSLT document for that page, thereby producing the HTML (or CSS, or JavaScript, or CSV, or XML, or JSON) output sent back to the browser.

      Love it.

  • camilo

    very nice! thanks

  • Jay

    Great explanation of XSL(T).

    From my experience with it a developer needs to be careful not to overdo what is in the XSL and use it only for adding formatting. I do not recommend it for interpreting the data on the client side….heres why (this is of course not set in stone by the developer gods)

    - XSL is difficult to maintain.
    - XSL is not object oriented.
    - XSL does not conform to programming standards.

    I like to have more control over what I develop. Pages and pages and pages of XSL files can be converted to objects and used much easier.

  • http://nudg.es sull

    nice to see a fresh CSLT article. i got back into it over last summer with a little experiment at http://nudg.es. here is a feed from my mobile phone:
    http://sull.nudg.es/feeds/feed.php?user=8455460324@vzwpix.com

    i love the idea of XSLT especially for this project where i create micro-messaging RSS feeds from email messages (using just subject line) and able to output a nice looking simple page of short messages and small attachments.
    i should dust it off and move the project further.

    cheers.