<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div><div class="tlid-language-bar ls-wrap"><div class="tl-wrap"><div class="tl-sugg"><div class="sl-sugg-button-container"></div><div class="ls-right-arrow"></div></div><div class="sugg-fade"></div><div class="tl-more tlid-open-target-language-list" aria-label="Plus" role="button" tabindex="0"></div></div></div><div class="source-wrap"><div class="input-full-height-wrapper tlid-input-full-height-wrapper"><div class="source-input"><div id="input-wrap" class="tlid-input-area input-area less-padding"><div class="gt-hl-layer" style="box-sizing: content-box; left: 0px; top: 0px; direction: ltr;" dir=""></div><br></div></div></div></div></div><div><br></div><div>Le vendredi 29 mai 2020 à 10:13 +0200, user-request@lists.gambas-basic.org a écrit :Send User mailing list submissions to</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre> <a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a></pre><pre><br></pre><pre>To subscribe or unsubscribe via the World Wide Web, visit</pre><pre> <a href="http://lists.gambas-basic.org/listinfo/user">http://lists.gambas-basic.org/listinfo/user</a></pre><pre>or, via email, send a message with subject or body 'help' to</pre><pre> <a href="mailto:user-request@lists.gambas-basic.org">user-request@lists.gambas-basic.org</a></pre><pre><br></pre><pre>You can reach the person managing the list at</pre><pre> <a href="mailto:user-owner@lists.gambas-basic.org">user-owner@lists.gambas-basic.org</a></pre><pre><br></pre><pre>When replying, please edit your Subject line so it is more specific</pre><pre>than "Re: Contents of User digest..."</pre><pre><br></pre><pre>Today's Topics:</pre><pre><br></pre><pre> 1. Re: xmlDocument Bug 1336 (T Lee Davidson)</pre><pre> 2. Request for new property z-order of the DesktopWindow object</pre><pre> (John Rose)</pre><pre> 3. Re: Request for new property z-order of the DesktopWindow</pre><pre> object (Christof Thalhofer)</pre><pre><br></pre><pre>----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----</pre><pre><br></pre></blockquote><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">On 5/2/20 1:17 PM, CD wrote:</span><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> By re-debugging the code I realized that not only the function</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> Save of the XmlDocument object truncates the prolog of the xml document,</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> but that the Open function of the same XmlDocument object also truncates the same prolog.</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> And in both cases (Open/Save) the Processing Instruction is deleted.</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> </font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> Moreover, after searching unsuccessfully in the objects of the gb.xml library,</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> especially in the XmlDocument object, I did not find anywhere a method</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> to create/modify a Prologue (<a href="https://www.w3.org/TR/xml/#sec-prolog-dtd">https://www.w3.org/TR/xml/#sec-prolog-dtd</a>)</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><font color="#737373" style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">> or a Processing Instruction (<a href="https://www.w3.org/TR/xml/#sec-pi">https://www.w3.org/TR/xml/#sec-pi</a>).</font><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">The Save method cannot save what isn't there. It appears that (in gb.xml/src/document.cpp) the XMLDocument_SetContent method, </span><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">called by XMLDocument_Open, assumes that a prolog, if it exists, *always* consists entirely of XMLDecl (lines 114-124).</span><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">It will retain a comment, but detaches it from the prolog. A Processing Instruction is lost.</span><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">-- </span><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">Lee</span><br style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><div><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><br></span></div><div><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">I fully agree with what you write!</span></div><div><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">And so, how do we do</span></div><div><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;"><br></span></div><div><span style="font-family: "Ubuntu Mono"; font-size: 17.33333396911621px;">Claude Desseré</span></div></body></html>