Hi all,
I tested the latest v27 patch for adding the xmlcanonicalize()  function.
Before applying the patch, xmlcanonicalize() was not available.
ERROR: function xmlcanonicalize(xml) does not exist
After applying the patch, rebuilding PostgreSQL, and starting a fresh
test cluster, the function is available in pg_catalog with the
expected function definition.
xmlcanonicalize(doc xml, keep_comments boolean DEFAULT true)

I also tested the following cases:
- Basic XML canonicalization
-Attribute ordering
-Conversion of empty elements
-Keeping comments (default)
-Removing comments with `keep_comments = false`
-Default value of `keep_comments`
-NULL inputs
-Invalid XML input

The results were as expected. For example, attributes were normalized from:
<foo b="2" a="1" c="3"/>
to:
<foo a="1" b="2" c="3"></foo>
The comment handling also worked as expected.
I ran the regression tests and all tests passed.
So the new functionality is working as expected, and I did not observe
any regression in the test suite.

Regards,
solai


Reply via email to