xPath question
This is an open discussion with 2 replies, filed under XSLT.
Search
Hmmm... dunno if this works but
{normalize-space(concat(normalize-space(entry/parent),' ',entry/name/@handle)}
Now why couldn't I see that!
There's a )
missing at the end, but that is definitely it! Cheers Nils...
Create an account or sign in to comment.
I have a good question about an xPath query I need to complete.
I am trying to concatenate values in a Reflection Field, one being a Parent value, and the other being a Name value. What I currently have is:
The
normalize-space
trims any whitespace for me so that my strings don't begin with a space.Has anyone spotted the flaw, and the reason for this question? Well, anyway, I will explain... If there is no parent, then the string result always starts with a space, as that is what the expression tells it to do.
What I need to achieve is an xPath expression that will only add a space if the parent has a value. I've heard of the Becker Method but I have no idea how to apply this.
Any smarty-pants people out there know the answer?