{"id":"xpath10-paths","version":"1.0.0","description":"List the canonical XPath 1.0 path of each node in a location-path node-set, in document order.","supported_operations":["canonical xpath 1.0 path of each match","absolute location path for selected xml nodes","xpath path list in document order","where each xpath match sits in the document","stable xpath pointer for a node set","generate reselectable xpath 1.0 paths"],"unsupported_operations":["XPath 2.0 paths and XSLT match patterns","rewriting the document or evaluating a non-node-set expression","arithmetic, variables and general XPath functions"],"semantics":["Same node-set as xpath10-select. Each node is replaced by one absolute path that selects that node again with the same namespace map.","The root path is /. An un-namespaced element uses its local name and a 1-based index among siblings of the same expanded-name, omitted only when it is the only such sibling.","A namespaced element is *[i] among all element siblings, always with the index. An un-namespaced attribute is @local. A namespaced attribute is @*[i] in source order.","A namespace node is namespace::prefix, or namespace::*[i] when the prefix is empty. text(), comment() and processing-instruction('target') omit [i] only when that group has one node.","Joining a step onto / produces /step, never //step. Union order does not change the path list; duplicates are removed before the paths are emitted.","/doc/chapter[5]/section[2] is both the XPath 1.0 abbreviated example and the canonical path of that section when five chapters exist and the fifth has two sections."],"limits":{"max_xml_bytes":4096,"max_expression_bytes":1024,"max_depth":32,"max_nodes":400,"max_steps":100000,"max_output_bytes":32768,"max_namespace_bindings":16,"max_namespace_uri_bytes":512,"max_name_chars":256,"max_union_operands":32,"max_xpath_depth":32},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["xml","expression"],"properties":{"xml":{"type":"string","minLength":1,"maxLength":4096},"expression":{"type":"string","minLength":1,"maxLength":1024},"namespaces":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":512},"maxProperties":16}}},"output_schema":{"type":"object","additionalProperties":false,"required":["count","paths"],"properties":{"count":{"type":"integer","minimum":0,"maximum":400},"paths":{"type":"array","maxItems":400,"items":{"type":"string","minLength":1,"maxLength":16384}}}},"examples":[{"input":{"xml":"<doc><para>A</para><para>B</para></doc>","expression":"//para"},"output":{"count":2,"paths":["/doc/para[1]","/doc/para[2]"]}},{"input":{"xml":"<doc/>","expression":"/"},"output":{"count":1,"paths":["/"]}},{"input":{"xml":"<doc><chapter><section>s1</section></chapter><chapter><section>s2</section></chapter><chapter><section>s3</section></chapter><chapter><section>s4</section></chapter><chapter><section>s5a</section><section>s5b</section></chapter></doc>","expression":"/doc/chapter[5]/section[2]"},"output":{"count":1,"paths":["/doc/chapter[5]/section[2]"]}}],"execute_url":"/v1/tools/xpath10-paths/versions/1.0.0/execute"}