0

Having declared

<xsl:param name='suffix'>some_string</xsl:param>

I tried to use its value in a function call like this

<xsl:when test='fn:ends-with(@name, {$suffix})'>

which ended with the following error:

XPST0003: XPath syntax error at char 20 on line 34 in {fn:ends-with(@name, {$}: Unexpected token "{" in path expression

What's the proper way to use parameter's value in a function call in XSL?

1 Answer 1

1

Try this:

<xsl:when test='fn:ends-with(@name, $suffix)'>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.