You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contrib/xml2: overloaded xslt_process() to provide variants for xmltype and specifying parameters in arrays
* There are apparently no functions that accept XML as text, except for xmlparse().
xslt_process() should therefore also accept xmltype.
* A version accepting text is still kept for backwards compatibility, but is considered
deprecated.
* The new xmltype-based version expects an array of stylesheet parameter-value pairs,
which is less limited than the now deprecated way of encoding all stylesheet parameters into
a single text argument.
We can now accept an arbitrary number of parameters and you can include `=` and `,` signs
in both the key and value strings.
Hstores haven't been used since they are in a module and we don't want to depend on any
additional module.
* The new implementation respects the database's encoding - text strings are always converted to UTF8
before passing them into libxml2.
* On the downside, xml_parse() had to be made an external function.
Since a declaration cannot be added to xml.h without drawing in libxml2 headers,
the declaration is repeated in xslt_proc.c.
Perhaps xml_parse() should be declared in a separate internal header?
* xmlCtxtReadDoc() now sets a dummy "SQL" URL to preserve line numbers in XSLT stylesheet errors.
This change at least does not break the test suite.
0 commit comments