XML Variable Select Question
This is an open discussion with 5 replies, filed under XSLT.
Search
I think so; however it would look more like this
<xsl:value-of select="$months/month[@number = $month]"/>
Hmmm, I just tried that without success. That line errors out and says "Invalid type: XPath evaluation returned no result"
You need to make use of exsl:node-set functionality, so it might look like this:
exsl:node-set($months)/month[@number = $month]
Edit: Removed typo ;)
You need to make use of exsl:node-set functionality, so it might look like this:
And don't forget to include the common namespace.
Great, got it to work by using exsl:node-set
instead of exslt:node-set
, not sure if that was a typo or if I set up my namespaces differently. Either way, thanks for the help.
Researching the namespaces landed me here, good to learn more about exsl, I've never known much about it while using Symphony.
Create an account or sign in to comment.
Sorry if this is a dumb question, but I'm going to ask it anyway. Been searching around and can't quite get clarity around XML within variables.
I know its possible to create a variable with XML within it, like this:
But then is it possible to perform a select statement kinda like this?