param overloading?
This is an open discussion with 11 replies, filed under XSLT.
Search
you need to define it as a xsl:param
in your main stylesheet to make it a global xsl:param
.
gotcha, thanks.
Figured out that you can actually make it global in any stylesheet, you just have to put it above any template elements. XSL is so cool, once php supports 2 my head will probably explode...
right. will php eventually support 2? that will make things freakin' awesome. i think saxon only supports 2 right now, correct?
PHP uses libxslt, which is part of the Gnome project -- unfortunately their website is utterly useless, but I imagine that at some point they'll work on libxslt2 (or whatever they'll call it). I've not seen any discussion about it though, so it could still be years away.
Yeah I started doing some digging on this today and it doesn't look like anything is in the works, which is unfortunate because XSLT 2 looks sweet.
Here's hoping for Symphony 4 ...
ya, lots of really useful functionality from 1 to 2. REGEXP
built in...a lot more logic syntax (for back of a better term), etc.
Where in my master.xsl do I put <xsl:param name="$publisher">?
put it above your <xsl:template match="/">
would work fine. as long as you put it above the templates that are doing the matching, you should be good. Also, you would do this instead: <xsl:param name="publisher" />
, no need for the $
. that's only necessary when you call/reference the param
.
Argh. It was the trailing / I had forgot.
Create an account or sign in to comment.
So, S2 doesn't do param overloading like 1.7, I guess? How do you test if a param exists without an error?