Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Best practice 1</strong> : <strong>use templates in stead of &lt; xsl:for-each ></strong> whenever you can (which is 99% of the cases)</p> <p>(may I add MAINTAINABILITY as extra ingredient in the best practices, imho even the most important one)</p> <p>For understanding xsl you realy need a bit of practice.<br> Not understanding what sth. is doing is very relative of course.</p> <p>That goes doube for XSLT, since the xsl:for-each construct tends to be </p> <ul> <li>more readable</li> </ul> <p>for a novice, but is in fact </p> <ul> <li>less structured, </li> <li>less simple, </li> <li>less concise and</li> <li>a lot less maintainable</li> </ul> <p>than templates, and only</p> <ul> <li>equaly readable (at best!!) for so. with a minimum of template experience.</li> </ul> <blockquote> <p>NEVER, EVER USE THE &lt; xsl:for-each > ELEMENT!</p> <p>I admit, the title is somewhat exaggerated, there do exist, I've been told, cases in which a "xsl for each" can have it's merits, but those cases are very, very rare.</p> <p>I once had to come up with a fairly complicated xml/xslt client site in less than a week, and used the for-each element all over the place. Now, several years later and, sort of, wiser, I took my time and rewrote the initial code, using only templates. The code now is much much cleaner and more adaptable.</p> <p>Either you know this, or either you should : &lt; xsl:template > and &lt; xsl: apply-templates> are almost always the way to go. If you are xsl-ing, and you don't fully understand these tags, stop your work now, learn them, get a aha-erlebnis, and continue your work a as a reborn (wo)man.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload