I'm writing an XSL transform in Visual Studio. It is reporting that the semicolon in the following is an "unexpected token":
<xsl:param name="delimiters" select=";#" />
Does anyone know how to escape the semicolon? It hasn't shown up on any character lists I've found so far.
wallenborn is right. The reason is that a
select
attribute in XSL always expects an XPath expression. If you want to put a string literal there, you need to quote it.Have you tried this?
Try the following entity (semi-colon is ASCII character 59)...
You presumably want the param
delimiters
to have the string;#
as it's value, given that that isn't a valid XPath expression? If so, you need to quote the attribute value:Note that the value is now wrapped in single quotes; this causes the attribute value to be interpreted as an XPath expression which returns a string.