The default xsl param value string cannot begin with a period

In my stylesheet, I am trying to set a default value for an input parameter for a line starting with a dot character. And always get error code 0x8004005 - Expected toden 'eof' found 'NAME'. For instance:

<xsl:param name="p1" select=".exe"/> 

However, it does not matter what follows the point. Always the same mistake. How to create this line to include the first point?

+4
source share
1 answer

You need to specify the "default value" as a string literal .

Just change:

 <xsl:param name="p1" select=".exe"/> 

in

 <xsl:param name="p1" select="'.exe'"/> 

In the first case, the value of the select attribute is evaluated as an XPath expression — not as a string.

+4
source

Source: https://habr.com/ru/post/1338434/


All Articles