{"id":"xml-exc-c14n-subtree","version":"1.0.0","description":"Exclusive XML Canonicalization 1.0 of one selected element and its descendants.","supported_operations":["exclusive canonicalization of an xml subtree","canonicalize one xml element and descendants","exc-c14n document subset by element name","strip unused ancestor namespaces from xml element","xml fragment exclusive canonical form","select element occurrence for exclusive c14n","inclusive prefix list on xml subtree apex","exclusive c14n of a named element"],"unsupported_operations":["inclusive canonicalization of a document subset","arbitrary xpath beyond one element name","xml digital signature creation","repairing a non-canonical fragment"],"semantics":["Selects the occurrence-th element whose qualified name matches element exactly, in document order, and canonicalizes that element and its descendants with Exclusive XML Canonicalization 1.0.","Omitted occurrence means 1. occurrence must be an integer from 1 to 1024; a value outside that range is invalid_input, and a name that does not occur that many times is invalid_input with details.reason element_not_found.","The subtree apex starts a fresh rendered-namespace map containing only the prebound xml prefix. Ancestor namespace declarations are emitted only when this element visibly uses them or the prefix is in the inclusive list. Ancestor xml:lang, xml:space, and xml:base are not copied.","Document-level comments and processing instructions outside the selected element are not part of the result. Comment content that contains \"--\" or ends with \"-\" throws invalid_input even when with_comments is false or omitted.","Serialization matches the whole-document tool: code-point attribute order, expanded empty elements, the same escapes, no Unicode normalization, and utf8_bytes equal to the UTF-8 length of canonical_xml. The returned element is the selector text and occurrence is the index used.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_input_bytes":8192,"max_canonical_bytes":8192,"max_output_bytes":49152,"max_depth":32,"max_nodes":1024,"max_attributes_per_element":32,"max_inclusive_prefixes":16,"max_name_bytes":128},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["xml","element"],"properties":{"xml":{"type":"string","minLength":1,"maxLength":8192},"element":{"type":"string","minLength":1,"maxLength":128},"occurrence":{"type":"integer","minimum":1,"maximum":1024},"with_comments":{"type":"boolean"},"inclusive_prefixes":{"type":"array","maxItems":16,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(#default|[A-Za-z_][A-Za-z0-9._-]*)$"}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["canonical_xml","utf8_bytes","element","occurrence"],"properties":{"canonical_xml":{"type":"string","minLength":1,"maxLength":8192},"utf8_bytes":{"type":"integer","minimum":7,"maximum":8192},"element":{"type":"string","minLength":1,"maxLength":128},"occurrence":{"type":"integer","minimum":1,"maximum":1024}}},"examples":[{"input":{"xml":"<n1:elem1 xmlns:n1=\"http://b.example\">\n    content\n</n1:elem1>","element":"n1:elem1"},"output":{"canonical_xml":"<n1:elem1 xmlns:n1=\"http://b.example\">\n    content\n</n1:elem1>","utf8_bytes":62,"element":"n1:elem1","occurrence":1}},{"input":{"xml":"<n1:elem2 xmlns:n1=\"http://example.net\" xml:lang=\"en\">\n    <n3:stuff xmlns:n3=\"ftp://example.org\"></n3:stuff>\n</n1:elem2>","element":"n1:elem2"},"output":{"canonical_xml":"<n1:elem2 xmlns:n1=\"http://example.net\" xml:lang=\"en\">\n    <n3:stuff xmlns:n3=\"ftp://example.org\"></n3:stuff>\n</n1:elem2>","utf8_bytes":121,"element":"n1:elem2","occurrence":1}},{"input":{"xml":"<p><a></a><a></a></p>","element":"a","occurrence":2},"output":{"canonical_xml":"<a></a>","utf8_bytes":7,"element":"a","occurrence":2}}],"execute_url":"/v1/tools/xml-exc-c14n-subtree/versions/1.0.0/execute"}