I have a XSLT where I’m getting a variety of Parameters from a variety of sources. All of these Parameters are supplied as plain strings.
For example <xsl:param name="ElementName" select="/.." /> might be fed the plain value of 'Apple'.
Others look like <xsl:param name="Pathstring" select="/.." /> and contain '//Parent/Apple|//Parent/Oranges'.
In the case of the param $Pathstring, I make use of saxon:evaluate() to parse the string into a valid xpath expression. I understand this portion of it.
But I need to create a template match by using the string supplied in a param as PART of an expression. I'm having some troubles doing this.
I know this isn't correct, but it shows what I'm logically trying to do. I would like a template that matches like this.
In other words I want the match="Parent/$ElementName" to evaluate as a valid xpath expression match="Parent/Apples" Taking the string from the parameter and using as part of xpath expression. I've tried making use of the saxon:evaluate and expression functions in combination to get it to match correctly. I'm still new to XSLT and staring at this any longer is just confusing me :)
Thanks, this community has been really helpful.