Re: [PATCH] Add CANONICAL option to xmlserialize - Mailing list pgsql-hackers

From solai v
Subject Re: [PATCH] Add CANONICAL option to xmlserialize
Date
Msg-id CAF0whuf1SjYi7=SEH95G9n9bO3bePRq5bTxiL9m06-WzDiAOzQ@mail.gmail.com
Whole thread
In response to [PoC] Add CANONICAL option to xmlserialize  (Jim Jones <jim.jones@uni-muenster.de>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Distinguish publication exclusions in object addresses
Next
From: Peter Smith
Date:
Subject: Re: Distinguish publication exclusions in object addresses