1

I am trying to interpret the meaning of the following condition:

<xsl:when test="contains($name,'|') or contains($name,'%7c') or contains($name,'%7C')"> 

Does the above checking whether the variable name has | in it OR has 7 lower case characters OR 7 uppercase characters?

kjhughes
  • 106,133
  • 27
  • 181
  • 240
parusha
  • 53
  • 4

1 Answers1

2

No, it checks whether $name contains any of the specified, literal substrings: | or %7c or %7C.

See XML XPath Language (XPath), Version 1.0, W3C Recommendation:

Function: boolean contains(string, string)

The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.

See also:

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • Thank you so much! I tested it. It is doing the same thing that you mentioned. Thanks for the quick response. – parusha Dec 03 '19 at 19:05