Generating a list of changes between releases

Post here questions and problems related to editing and publishing DITA content.
msambasiva
Posts: 87
Joined: Tue Jul 17, 2018 6:57 am

Generating a list of changes between releases

Post by msambasiva »

Hi,

We have a requirement to generate a list of changes between releases. So I am referring to below blog by Radu,https://blog.oxygenxml.com/topics/dita- ... -list.html .

I got confused at last but one step i.e,

Open the build file com.oxygenxml.ant.parser.dita/resources/build.xml in Oxygen XML Editor. The build file has three stages which may need to be slightly changed to fit your project's structure:

Run the git command in your project's folder and find all differences related to a certain branch. In my case the branch is called oxygen22.0 so it needs to be changed to your particular branch name.
Apply the XSLT stylesheet createChangesTopic.xsl on the changes list and generate a DITA topic. You will need to make changes to the stylesheet so that the generated paths to the changed topics are relative to the place where the generated DITA topic is located.
Run an XSLT stylesheet on the DITA topic to add the @class attributes.


Do we need to add the 'git diff --names-only <branch-name>' command results to a topic manually?
Do we need to apply the XSLT stylesheet createChangesTopic.xsl on the changes list manually?

I've updated the build.xml as below,

Code: Select all

    <target name="dist">
        <dirname property="baseFolder" file="${input.file}"/>
       <!-- Find out all changes in the project -->
       <exec executable="git" dir="${baseFolder}/../">
        <arg line="diff --name-only master"/>
        <redirector output="${baseFolder}/[b]dynamicChangeHistory.gen.dita[/b]" alwayslog="true"/>
       </exec>
        <!-- Create the topic containing the list of changes -->
        <xslt in="createChangesTopic.xsl" style="createChangesTopic.xsl" out="${output.file.temp1}">
            <param name="pathToChangesFile" expression="${baseFolder}/[b]dynamicChangeHistory.gen.dita[/b]"/>
            <xmlcatalog>
                <catalogpath path="../../../catalog-dita.xml"/>
            </xmlcatalog>
        </xslt>
        
        <!-- Now expand @class attributes in DITA content -->
        <xslt in="${output.file.temp1}" out="${output.file}" style="identity.xsl">
            <xmlcatalog>
                <catalogpath path="../../../catalog-dita.xml"/>
            </xmlcatalog>
        </xslt>
    </target>
Added the topicref in main ditamap as below,

Code: Select all

   <topicref href="dynamicChangeHistory.gen.dita" format="ant-parser"/>
When I generate the PDF, I don't see expected new topic in the PDF output guide.

It would be great if you can suggest any clue.

Thanks and regards,
Samba.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Generating a list of changes between releases

Post by Radu »

Hi Samba,

Honestly it's been a while since I wrote that blog post.
Did you download the "com.oxygenxml.ant.parser.dita" DITA OT plugin from the exact place referenced in the blog and then integrate it in your DITA OT installation?
You say you made changes to the build file, if you add a "<fail/>" in the target there does the DITA to PDF transformation end with that failure? This would be useful to give us an indication that your build file changes are taken into account.
In the Oxygen Preferences->"DITA / Logging" page you can switch "Show Console output->Always" and save the settings.
After running the transformation can you see any logging in the "DITA OT" console output located at the bottom of Oxygen about your "dynamicChangeHistory.gen" file?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
msambasiva
Posts: 87
Joined: Tue Jul 17, 2018 6:57 am

Re: Generating a list of changes between releases

Post by msambasiva »

image.png
image.png (44.92 KiB) Viewed 962 times
Thanks Radu. My output process invoking the new plugin i.e com.oxygenxml.ant.parser.dita .

Able to generate a pdf output with new topic in TOC as 'List of changes since last release'. Able to navigate to corresponding topic from the page 'List of changes since last release'.

I've an issue with sub ditamaps which are referenced from main ditamap. When I've changes to ditmaps, it's listed as #unique_<number> in the page 'List of changes since last release'.

Ex: I've updated two ditamap files between two branches. There are two entries listed as below with broken links,
• #unique_14
• #unique_15

So Does it support ditamap changes? If so, what could be the expected behavior with ditamap changes?

Thanks,
Samba.Image
Attachments
image.png
image.png (147.32 KiB) Viewed 962 times
image.png
image.png (147.32 KiB) Viewed 962 times
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Generating a list of changes between releases

Post by Radu »

Hi Samba,

For my original idea I only thought about modified topics between releases. So I do not know how changes in DITA Maps could be handled by the plugin, maybe you can skip then when generating the topic as users will probably be interested in content changes and content is inside the topics.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply