Nov 19
Back in 2001 I was in TechEd Barcelona where Microsoft unveiled Sharepoint and .NET 1.o. I remember like yesterday when Don Box was demoing WebServices from bathtub (SOAP) and coding c# from MacBook in Microsoft event!.
Anyway, after seeing Microsoft’s plan for following years I decided fully focus on Microsoft Technology. I saw first SharePoint which I think sucked. WebServices weren’t interesting either it just felt a bit too hairy for doing simple things. But what I loved was the whole concept of ASP.NET, C# and XML. After seeing XSLT in action I knew this is going to be my language, and it was. Well at least until now. XSLT is really great for templating websites, I gone through many tempalting engines but nothing beats good old XML/XSLT transformations. It is simple and fast. Well, it can get complex sometimes but usually when XSLT gets complex it means you are doing something wrong. Then it’s time to stop and think. Maybe, this is faster in code-behind or perhaps maybe it’s a good idea to write XSL -helper in code-behind for this.
I have to say, I have never come comfortable building sites from .NET controls basically because it was producing bad html markup-up and I don’t have full control how to build html on it but Microsoft has made it better over the time and nowadays it even produces valid mark-up. But still, I have to compile a DLL when making small updates. This is where XSLT rocks!
Because of this, I have waited (.NET 1.1)… and I have waited (.NET 2.0-3.5)… but there hasn’t been XSLT 2.0. Recently I read blog post in XML.com from M. David Peterson Question: Is Microsoft Working On An XSLT 2.0 Processor? Answer I am quoting him who quotes Microsoft XML Team’s WebLog : Chris Lovett Interview
“As for XSLT 2.0 - we’ve heard from customers and understand the improvements in XSLT 2.0 over XSLT 1.0, but right now we’re in the middle of a big strategic investment in LINQ and EDM for the future of the data programming platform which we think will create major improvements in programming against all types of data.”
DAMN!
Bad news for me… Now with all MVC/LINQ/WEB2.0 stuff… Isn’t XML cool anymore?
May 27
Sorting Sitecore data to multicolumn html table is quite hard in XSLT because data in XML is not sorted by item/@sortorder.
I finally found out how to do this so it will actually work and I am not loosing data. The trick is creating data first into a flat XML Nodeset and looping this data then to a multicolumn table using following-sibling::item commands. Here is the small sample code for this where I take abstract content structure from the Sitecore to a XML Nodeset <ul><li>xxxxxx</li></ul>.
First let’s make a variable.
<xsl:variable name=”keywords”>
<ul>
<xsl:for-each select=”$keywords”>
<xsl:for-each select=”descendant-or-self::item[(@template='keywords')]“>
<li>
<xsl:value-of select=”sc:fld(’text’,.)”/>
</li>
</xsl:for-each>
</xsl:for-each>
</ul>
</xsl:variable>
Then using msxsl:node-set -function (http://msdn2.microsoft.com/en-us/library/hz88kef0(vs.71).aspx) I create nodeset out of the XSL variable and loop data to the html table.
<table>
<xsl:for-each select=”msxsl:node-set($keywords)/ul/li[position() mod 3 = 1]“>
<tr>
<td>
<xsl:value-of select=”.”/>
</td>
<xsl:for-each select=”following-sibling::li[position() < 3]“>
<td>
<xsl:value-of select=”.”/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
I would be very keen to know if you have done this in pure XSLT because msxsl:node-set seems to be quite slow.
Jun 20
I have been using MS Visual SourceSafe for source control in my work since 99 and I have never liked it. It has very limited features and not to mention random database crashes. If there is a one product I would like to send invoice to its creator from loose hours this would be it. It is a really bad product and nobody should use it.
Last year however I found a life savior. I made one project with Subversion SVN and it was a instant hit in my world. SVN delivers exactly what I need for developing projects, I can put everything to SVN not only code. Contracts, Specs, Photoshop layouts, Patches, DLL’s you name it.
Here is a little check list I found from MSDN Forums, this get’s you started with SVN.
- TortoiseSVN, a good Windows Explorer extension, despite it’s lack of support of Unicode support in any of its Diff tools. http://tortoisesvn.tigris.org/download.html
- AnkhSVN -not a true SCC plug-in, instead works as an add-in, but has much better functionality that the other couple of SCC controls that I’ve tried. http://ankhsvn.tigris.org/
- SVN Explorer - pretty basic tool, but at least provides a stable Explorer-like stand-alone repository explorer. http://kafana.org/SvnExplorer/
- WinMerge - an excellent freeware open-source file Difference viewer, and merge tool WITH unicode support (use the WinMergeU.exe file). http://winmerge.sourceforge.net/downloads.php
- imageDiff - good free tool for comparing two images for changes. http://www.download.com/ImageDiff/3000-2192_4-10401779.html. Note: connects to the internet to display ads in a pane at the bottom, but if you use Zonealarm, then disable Internet access, whilst allowing access to the trusted zone. This prevents the program from freezing, without allowing it to display ads.
- Finally - WebReports8, another VSS.NET add-in. I haven’t actually finished trying this, but it has some nice features. You’ll have to re-compile it with the “_scc” option. See here http://www.codeproject.com/dotnet/file_diff_and_webreports.asp#xx1167087xx read the details on the modification that needs to be performed, then scroll up to the main article)
Nov 21
Microsoft has unveiled a new proposal called SSE, which stands for Simple Sharing Extensions for RSS and OPML. The SSE specification is under a Creative Commons license ? Attribution-ShareAlike.
This is looking really interesting, there is more blog posts about it at Dave Winer’s Scripting News, TechCrunch and Alex Barnett.
Nov 03
The msxsl:node-set function enables you to convert a result tree fragment into a node set. The resulting node set always contains a single node and is the root node of the tree.
<xsl:variable name="books">
<book author="Michael Howard">Writing Secure Code</book>
<book author="Michael Kay">XSLT Reference</book>
</xsl:variable>
<authors>
<xsl:for-each select="msxsl:node-set($books)/book">
<author><xsl:value-of select="@author"/)</author>
</xsl:for-each>
</authors>
Sep 18
Last 1.5 years I have been drifting towards Linux world since Microsoft has been pretty much dead when it comes to interesting stuff for web developers. I can see that Microsoft is working hard on creating new API’s like XAML which is (IMHO) from web developer’s point of view quite useless. Hopefully someone in Microsoft soon wakes up for SVG.
I have been running latest Ubuntu on my laptop which works like a charm. But still I have windows in dual boot because I need to sometimes work on Photoshop, Flash and Visual Studio. But slowly I have started to move my development environment to Linux.
I think SVG is going to be big in following years; SVG has more potential than XAML simply because SVG was designed for web and it’s part of web standard. It will revolutionize interface in internet as well as on operating systems. Therefore I have decided to start move to SVG world with the Mono, Cairo and Gtk+. Gtk+ is a library used to build GUI applications on UNIX and the heart of the Gnome desktop. Gtk+ is built on top of the 2D graphics engine Cairo which released version 1.0 in August: every widget is now written using Cairo operations and most importantly developers can now draw their own widgets using the PDF-like rendering model offered by Cairo.
Cairo also brings to the end user nice touches like anti-aliased rendering for a more pleasant experience. Gtk builds on this new functionality to bring vector-based themes to the desktop as well.
May 29
Developers and designers have come really crazy about AJAX. I started to look for AJAX framework for some simple form validation and I found huge amount of code samples and frameworks which are under development or already on version 5.0.
Read the rest of this entry »
May 17
With Backbase software you can quickly create user-friendly and highly interactive Rich Internet Applications. These applications are based on Web Standards and can be viewed in almost any modern web browser without installing any plug-ins.
http://www.backbase.com/
Recent Comments