{"id":"xpath10-string","version":"1.0.0","description":"Evaluate an XPath 1.0 expression that yields a string, including concat, substring, translate, and string conversion.","supported_operations":["xpath 1.0 string result","xpath concat substring and translate","xpath normalize-space value","xpath substring-before and substring-after","convert an xpath 1.0 value with the string function","xpath string literal result","compute an xpath 1.0 string expression","מחרוזת xpath string"],"unsupported_operations":["query an XML document with a location path","XPath 2.0 functions such as replace, matches, tokenize, and lower-case","format-number display formatting"],"semantics":["Returns the XPath 1.0 string value of the expression. A number or boolean result is unsupported_input reason result_type, after evaluation.","Keyword operators and, or, div, and mod match only token kind name. Symbolic operators and delimiters match only kind op. Quoted spellings such as 'div', 'and', '=', ')', and '*' are strings and are syntax errors.","Characters are Unicode scalar values. concat, substring, substring-before, substring-after, translate, normalize-space, and string-length count code points and do not normalize. Whitespace is XML S only.","translate keeps the first mapping for a repeated from-character and deletes a character with no to-character. substring is 1-based and rounds its numbers with the XPath round function.","Numbers inside a string conversion use section 4.2: NaN, Infinity, -Infinity, and plain decimal. Negative zero's XPath string is 0. No scientific notation.","and/or short-circuit only at evaluation, after the whole expression is parsed. Zero-argument string() and normalize-space() throw unsupported_input reason context_node when evaluated.","Check order: UTF-8 input bytes, then parse limits and unsupported syntax, then the 96-character string cap, then the result type, then the JSON output byte cap. Output is exactly {\"result\": string}.","Parentheses do not count as nodes. Depth 0 is a bare literal; each parenthesis and each function argument adds one. Eight nested parentheses are the maximum."],"limits":{"max_input_bytes":512,"max_string_codepoints":96,"max_depth":8,"max_nodes":21,"max_arguments":4,"max_output_bytes":100},"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":"string","maxLength":96,"description":"XPath string value. Empty is allowed. maxLength counts code points."}}},"examples":[{"input":{"expression":"substring(\"12345\",2,3)"},"output":{"result":"234"}},{"input":{"expression":"translate(\"bar\",\"abc\",\"ABC\")"},"output":{"result":"BAr"}},{"input":{"expression":"substring-before(\"1999/04/01\",\"/\")"},"output":{"result":"1999"}}],"execute_url":"/v1/tools/xpath10-string/versions/1.0.0/execute"}