xsltApplyStylesheetUser() removes DTD from doc
"Christoph M. Becker" <[email protected]> Fri, 12 Jun 2020 12:32:06 +0200
| Newsgroups | gmane.comp.gnome.lib.xslt |
|---|---|
| Message-ID | <[email protected]> |
Hi all, while investigating on a PHP bug[1], I found that xsltApplyStylesheetUser() permanently removes the XML_DTD_NODE from the given document (doc, 2nd parameter). There is a respective comment[2] in the implementation of xsltApplyStylesheetInternal() which points out that this is done on purpose, but I wonder if this modification is supposed to be *permanent*. The documentation on xsltApplyStylesheetUser()[3] is rather terse, and does not mention that any modification to the given doc is supposed to happen, so I assumed that doc is not modified in any way. Could someone please clarify whether the current behavior is intentional? Thanks, Christoph [1] <https://bugs.php.net/66937> [2] <https://github.com/GNOME/libxslt/blob/v1.1.34/libxslt/transform.c#L5894-L5897> [3] <http://xmlsoft.org/XSLT/html/libxslt-transform.html#xsltApplyStylesheetUser>