Really annoying XSLT problem
This is an open discussion with 13 replies, filed under XSLT.
Search
Ignore this, it turns out I was doing some maths wrong in another template. Tired sleepy eyes looking at code.
Just a quick thought: you could try and see if it works if you use < 558
rather than<= 557
, in case the <=
is the problem.
Oh ok :)
The conditional logic is pretty straightforward. I don't see anything inherently wrong with it. What does your XML look like? Perhaps stick it in XPathr.com so the rest of us can take a stab.
Wow, I was really late on this one. You guys are fast.
It's the time difference Allen, that's all... ;o)
Just a sidenote: you could have used the otherwise
tag, too.
That would save another value to update if you ever want to scale the images differently.
They're not the only when
statements in the real choose
there's more and an otherwise
... But thanks!
I love the title of this post - so familiar. I felt immediately drawn to it :-)
It should be changed to
"Really annoying potato looking guy posts his silly maths mistakes online again"
potato looking guy
BTW: Will your old avator picture eventually come back?
Well, I had to remove the green hair. I re-bleached it, then got into some tv so chemical burned my scalp. Having a bit of hair free time to fix myself.
Maybe one day (when I hit a mid life crisis).
:-(
Create an account or sign in to comment.
Now, I've done this so many times before, and never had this problem, so I'm super confused and annoyed by this.
I am splitting images using JIT, so that one can be used as a video poster image, and the other be the bottom of the image.
This is all depending on some logic to choose whether the image is big enough to split. The images are 990x557 pixels in dimension, and this is correctly reflected in the meta node for the image.
So, I am doing an
xsl:choose
to check the height, which for images hugely over the 557 mark, works. Images that are exactly 557 pixels in height are not doing anything at all.I've tried jiggling the sizes around by 1 or two pixels, but still no luck. The top
when
statement never returns, unless I stick a ridiculous value in there like415
I'm going crazy here.