Greg Beech's Website

August 2006 - Greg Beech's Tech Blog

  • Using xsl:for-each is almost always wrong

    In fact I can't think of a single place where it is a good idea to use xsl:for-each, but in software there are very few absolutes and so its possible there might be one or two. By replacing it with xsl:apply-templates you can make your XSLT stylesheet flatter in structure, easier to read, more flexible and more maintainable. To root this in the real world, lets take a small piece of XML that we...
    Filed under:
Copyright (C) Greg Beech. All rights reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems