String, in the simplest sense of a string of Unicode characters, is one of the (4) primitive data types that an XPath expression can evaluate to. It is the only string data type that XPath has.
Explicit string typing
In contexts where an XPath expression is expected, you can surround an XPath expression by quotes to express that you mean a string and not a node set expression (ie., not a node test). The following yields the string 'xy' independently of context:
Accordingly, you must quote literal string input parameters that you pass to XPath functions and Blend functions, since these function calls are just another type of XPath expression:
Regular XML attribute values
Do not confuse XPath string expressions with regular XML attribute values that are string literals. The latter are XML names. In this example, the 'ADMIN' string is a regular XML attribute value, and therefore is not quoted:
In this example, the SQL statement is a regular XML attribute, and therefore is not quoted. As a consequence, the quotes inside the SQL do not need to be escaped:
In this example, the file path is a regular XML attribute, and therefore is not quoted: