Generating a list of changes between releases
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 91
- 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,
Added the topicref in main ditamap as below,
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.
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>
Code: Select all
<topicref href="dynamicChangeHistory.gen.dita" format="ant-parser"/>
It would be great if you can suggest any clue.
Thanks and regards,
Samba.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generating a list of changes between releases
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: Generating a list of changes between releases
Post by msambasiva »
image.png
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.

You do not have the required permissions to view the files attached to this post.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generating a list of changes between releases
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service