3 ms·
Much content in this article is interesting, with some caveats. * The title feels very wrong and may reduce the article content's actual value for people who u
by s_gourichon 10y ago
Much content in this article is interesting, with some caveats.
* The title feels very wrong and may reduce the article content's actual value for people who use XSLT. The good scenario of this title would be: it helps angry people finding the article and if they actually read it they get enlightened. Does it happen?
* A dose of redundancy (dynamic includes for example are repeated a number of times).
* Some issues are genuine limitations, e.g. "Two column table from unsorted data", because "if you want to do further processing on it you have to convert the r-t-f to a node-set" and I've run into that. Solved since.
* Some questions are misleading because asked with a wrong approach, like an instance of the XY problem ( http://xyproblem.info/ http://xyproblem.info/ ). E.g. "Non well formed HTML input" -> such approach looks like the user actually wants a template mechanism, and instead of that asks for pasting invalid HTML. As written in article, "XSLT is about trees, not tags"... and IMHO that's where it gets a lot of power from!
All in all, this document is interesting, though most value in it is in understanding the spirit and style of XSLT, like "Variables in XSLT have scope based on their appearance in the stylesheet not on runtime behaviour"
If after reading it you understand better what you can do with XSLT (because false paths are now marked in your head, making good paths easier to spot), then it was worth reading.
And for you that read this far: use XSLT for simple things, don't try to pack inside stylesheets issues that don't belong there. Generating ad-hoc XSLT (with whatever tool that can do that well) is fine. Also, since style sheets are XML, generating them with another "upstream" XSLT stylesheet if good, though you have to take care of namespaces. You might think you have to problems instead of one, but they are actually much more doable. KISS and "divide and conquer" principles still apply.