I am currently using the UWC (Universal Wiki Converter) tool to migrate our MediaWiki pages to Confluence. While going through the code of UWC I found that it makes several calls to the XML-RPC based APIs of Confluence to send the pages. These APIs are old APIs of Confluence & deprecated now.
Just want to know how the XML-RPC API "confluence2.addAttachment" works in case of inline image files.
I see the UWC tool first creates the new page only with text content in Confluence by making a call to the "confluence2.storePage" API. Then it makes a "confluence2.addAttachment" call with a payload that contains the image file name and the raw bytes of the image in the parameters Vector object.
In the 1st call the payload is xhtml that has only the insert definitions of images inside the text content and not the actual images. A snippet of that xhtml is given below taht has 2 png files :
<p>Because <strong>R</strong> is mathematical and high level, the code for generating latitudes and longitudes in it is straightforward. <em>Why use Rodrigues parameters rather than some other representation for rotation?</em> That's because it is simpler to use, as a rotation about an arbitrary axis is specified. The Rodrigues formula is also numerically stable. <a href="http://mathworld.wolfram.com/Quaternion.html">Quaternions</a> offer another comparable representation (see <a href="http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/index.html">here also</a>. They are a generalization of <a href="http://mathworld.wolfram.com/ComplexNumber.html">complex numbers</a>.</p>
<p><ac:image><ri:attachment ri:filename="RodriguesRotationsInR.png" /></ac:image></p>
<p>There are a number of libraries used, primarily for plotting results. There are also several utility functions, like <strong>pause</strong>, and other functions for coming out of and going back to the geocentric geographic coordinate system of latitudes and longitudes:</p>
<p><ac:image><ri:attachment ri:filename="RLibrariesAndWorkRoutine.png" /></ac:image></p>
I have two questions.
1 - What is the meaning of <ac:image><ri:attachment/> tag here?
2 - How the addAttachment API knows where to insert the image in the page & inline to the text? Does it match the file name in the payload with the filename in the tag "ri:filename" ?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.