Occording to the XSLT 1.0 specification parameters and variables in XSL(T) are basically more like constants than like variables. Ok, bad naming then but let’s get to the point of this post: I’m currently writing a small template engine based on XSL for a project. Here I use parameters for passing i.e. small language specific texts to the stylesheets. I use a small hash for caching these parameters to that I still have my re-declaration.
Then I thought, perhaps PHP5 is caching these parameters before sending it to the stylesheet by itself through the XsltProcessor::setParameter(…) method. And yes, it seems to do this :-) First I thought it doesn’t thanks to some caching of my template function :-)
Do you want to give me feedback about this article in private? Please send it to comments@zerokspot.com.
Alternatively, this website also supports Webmentions. If you write a post on a blog that supports this technique, I should get notified about your link π