{"id":"xpath10-boolean","version":"1.0.0","description":"Evaluate an XPath 1.0 boolean expression: comparisons, and, or, not, starts-with, contains, and boolean conversion.","supported_operations":["xpath 1.0 boolean result","xpath and or not true and false","xpath equality and relational comparison","xpath starts-with and contains checks","compute an xpath 1.0 boolean expression","xpath comparison chain such as three greater than two","xpath boolean conversion of a string or number","בוליאני xpath boolean"],"unsupported_operations":["lang() against an xml:lang context","compare node-sets","XPath 2.0 general comparisons versus value comparisons"],"semantics":["Returns an XPath 1.0 boolean as a JSON boolean. A string or number result is unsupported_input reason result_type after evaluation.","or is lower precedence than and, and both are left-associative. The right operand of or is not evaluated when the left is true. The right operand of and is not evaluated when the left is false. Parsing still rejects unsupported syntax on the skipped side.","Equality converts to boolean if either side is boolean, otherwise to number if either side is number, otherwise it compares strings by code points. NaN equals nothing, including NaN. Relational operators always convert both sides with number().","3 > 2 > 1 is (3 > 2) > 1 and is false. boolean of a non-empty string is true, including the strings false and 0. boolean of 0, -0, or NaN is false.","Keyword and and or match only token kind name. A quoted 'and' or '=' is a string and is a syntax error.","The JSON object {\"result\":false} is 16 UTF-8 bytes, which is the output cap. {\"result\":true} is 15 bytes. No larger boolean encoding exists, so the cap is saturated by false() and is still checked.","Check order: input bytes, parse limits, string-length cap, result type, then output bytes. A 97-character literal is limit_exceeded before the type check."],"limits":{"max_input_bytes":512,"max_string_codepoints":96,"max_depth":8,"max_nodes":21,"max_arguments":4,"max_output_bytes":16},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["expression"],"properties":{"expression":{"type":"string","minLength":1,"maxLength":512,"description":"XPath 1.0 value expression. maxLength counts Unicode code points. The UTF-8 cap is limits.max_input_bytes."}}},"output_schema":{"type":"object","additionalProperties":false,"required":["result"],"properties":{"result":{"type":"boolean","description":"XPath boolean value."}}},"examples":[{"input":{"expression":"true()"},"output":{"result":true}},{"input":{"expression":"false()"},"output":{"result":false}},{"input":{"expression":"3 > 2 > 1"},"output":{"result":false}}],"execute_url":"/v1/tools/xpath10-boolean/versions/1.0.0/execute"}