[asterisk-bugs] [JIRA] (ASTERISK-29792) xmldoc: Dump invalid to XML DTD: XInclude

Asterisk Team (JIRA) noreply at issues.asterisk.org
Mon Dec 6 08:17:35 CST 2021


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257264#comment-257264 ] 

Asterisk Team commented on ASTERISK-29792:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

> xmldoc: Dump invalid to XML DTD: XInclude
> -----------------------------------------
>
>                 Key: ASTERISK-29792
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29792
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Codecs/codec_opus, Documentation
>    Affects Versions: 16.22.0, 18.8.0, 19.0.0
>            Reporter: Alexander Traud
>
> In Jul. 2018 with Asterisk 13.23.0 (Gerrit-[9541|https://gerrit.asterisk.org/9541], Commit [58c7b64|https://github.com/asterisk/asterisk/commit/58c7b64]), the in-memory, runtime XML document(s) are copied into a new XML root to create a single file. By this, any XML Stylesheet (XSLT) is removed. Furthermore, libxml2 moves the namespace ‘xi’ for W3C XInclude from the root XML element down to four XML elements called ‘manager’:
> * CoreShowChannels
> * PJSIPShowEndpoint
> * PJSIPShowAors
> * PJSIPShowAuths
> However, {{doc/appdocsxml.dtd}} only allows that namespace in the root. Consequently, both XMLStarlet and xmllint (of libxml2) state that the XML file created as a result of the command {{xmldoc dump <file>}} is not valid:
> {code}
> No declaration for attribute xmlns:xi of element manager
> {code}
> The commands used:
> {code}
> xmllint --noout --dtdvalid doc/appdocsxml.dtd <file>
> xmlstarlet val --err --dtd doc/appdocsxml.dtd <file>
> {code}
> When reversing that change, the resulting XML file validates, if the Digium audio-codec module opus_codec is not loaded.
> *Note 1*:
> I am not planning to work on this because I came to the conclusion that the whole approach in that change is wrong: Why does codec_opus module create a complete new XML document, why does it not attach its XML element ‘configInfo’ into the existing XML DOM? Because that module is closed source, I can not investigate and fix further. My recommendation: Reverse that change and fix the codec_opus module instead. Yes, I could fix that change and copy over the namespace(s) and XSLT … however, as stated, I do not think that the is correct approach.
> *Note 2*:
> The dumped XML file still lacks a DTD. Not sure why.
> *Note 3*:
> This issue report here is rather a nit-pick because the XML file is valid semantically. Another approach would be simply to change the DTD or not validating against the DTD at all. However, this issue _blocks_ me to add a DTD validation step to {{tests/CI/publishAsteriskDocs.sh}} to prevent similar issues in future.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list