{"id":"xpath10-evaluate","version":"1.0.0","description":"Evaluate an XPath 1.0 value expression and return its type with an exact string, number, or boolean token.","supported_operations":["evaluate an xpath 1.0 value expression","xpath 1.0 expression result type","xpath core functions without a document","tagged xpath 1.0 string number or boolean","compute an xpath 1.0 expression value","xpath literals operators and core functions","xpath 1.0 value subset result","חישוב xpath evaluate"],"unsupported_operations":["select XML nodes","bind XPath variables","evaluate XPath 2.0 or XQuery"],"semantics":["Evaluates one XPath 1.0 value expression and returns type string, number, or boolean. result is always a string token: the string itself, the numeric token (-0 for negative zero), or true or false. xpath_string is the section 4.2 conversion. Negative zero's xpath_string is 0.","The same expression subset, conversions, short-circuit, and rejections as the typed tools. This tool accepts every result type the subset can produce.","Keyword operators match only token kind name. Symbolic operators and parentheses match only kind op. Quoted operator spellings are syntax errors.","Key order is type, result, xpath_string. A string result of 86 code points produces 219 UTF-8 bytes of JSON, the output cap. 87 code points is limit_exceeded.","Check order: input bytes, parse limits and unsupported syntax, the 96-character string cap, then output bytes. There is no result_type rejection.","/ is not division. Node-sets, variables, predicates, axes, namespaces, and XPath 2.0 are rejected by name rather than approximated."],"limits":{"max_input_bytes":512,"max_string_codepoints":96,"max_depth":8,"max_nodes":21,"max_arguments":4,"max_output_bytes":219},"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":["type","result","xpath_string"],"properties":{"type":{"type":"string","enum":["string","number","boolean"]},"result":{"type":"string","maxLength":96,"description":"String value, numeric token (negative zero is -0), or true or false. Empty is allowed for a string."},"xpath_string":{"type":"string","maxLength":96,"description":"Section 4.2 conversion. Negative zero is 0. Booleans are true or false."}}},"examples":[{"input":{"expression":"substring(\"12345\",2,3)"},"output":{"type":"string","result":"234","xpath_string":"234"}},{"input":{"expression":"5 mod 2"},"output":{"type":"number","result":"1","xpath_string":"1"}},{"input":{"expression":"3 > 2 > 1"},"output":{"type":"boolean","result":"false","xpath_string":"false"}}],"execute_url":"/v1/tools/xpath10-evaluate/versions/1.0.0/execute"}