[Home] [By Thread] [By Date] [Recent Entries]
On 23.02.2017 13:49, Rick Quatro rick@xxxxxxxxxxxxxx wrote:
I have an attribute value that I want to convert to a sequence of decimals: tokenize returns a sequence of strings and then then the predicate [.] applied to the sequence of strings checks the boolean value of each string and empty strings, when converted to a boolean, are false while non-empty strings are true. If you check https://www.w3.org/TR/xpath-30/#id-filter-expression then it says The predicate truth value is derived by applying the following rules, in order: If the value of the predicate expression is a singleton atomic value of a numeric type or derived from a numeric type, the predicate truth value is true if the value of the predicate expression is equal (by the eq operator) to the context position, and is false otherwise. [Definition: A predicate whose predicate expression returns a numeric type is called a numeric predicate.] Otherwise, the predicate truth value is the effective boolean value of the predicate expression. and https://www.w3.org/TR/xpath-30/#id-ebv says If its operand is a singleton value of type xs:string, xs:anyURI, xs:untypedAtomic, or a type derived from one of these, fn:boolean returns false if the operand value has zero length; otherwise it returns true.
|

Cart



