oxygen-batch-converter-addon icon indicating copy to clipboard operation
oxygen-batch-converter-addon copied to clipboard

Transfer more information from Confluence import data to DITA to allow powerfull custom XSLT post processing

Open SanFanDocu opened this issue 3 years ago • 1 comments

It seems, there is no way to customize the Confluence to DITA import. Maybe it would be possible to pass more information to the DITA output. This would help to develop custom XSLT post processing.

Todo

  • Pass div elements from HTML to DITA.
  • Translate span elements into e.g. data or unknown elements
  • Transform @class attributes into e.g. @base in DITA.

Here is an example of a Confluence export HTML fragment containig a notice block:

     <div class="confluence-information-macro confluence-information-macro-note">
              <span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span>
              <div class="confluence-information-macro-body">
                    <p>Service may only be carried out by technicians trained by manufacturer!</p>
               </div>
      </div>        

the current generated DITA output looks like this

      <p>Service may only be carried out by technicians trained by manufacturer!</p>
                                   

if the importer would keep as much information, structure and metadata as possible like the following...

      <div base="confluence-information-macro confluence-information-macro-note">
                 <unknown base="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></unknown>
                  <div base="confluence-information-macro-body">
                        <p>Service may only be carried out by technicians trained by manufacturer!</p>
                  </div>
      </div>

... the customer has all information required to build a individual XSLT post processing output like this:

     <note type="warning">
              <p>Service may only be carried out by technicians trained by manufacturer!</p>   
     </note>                                   

SanFanDocu avatar Apr 18 '23 17:04 SanFanDocu

Hi, Thank you for your feedback. I registered an internal issue for adding an option for controlling the preservation of information from the class attribute. I will update this thread when we manage to implement this in a future release.

Best regards, Cosmin

DunaMariusCosmin avatar Apr 19 '23 08:04 DunaMariusCosmin