Generate topic ID to match file name
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 316
- Joined: Wed Jun 17, 2015 10:19 am
Generate topic ID to match file name
Post by ann.jensen »
Hi,
I am in the midst of refactoring my DITA files to set the top-level topic id to match the file name so that it is both unique and informative. I have managed to allow many duplicate topic ids proliferate over time
This is proving a tedious process and I wonder is there any short-cut to achieving this rather than doing each file manually?
Thanks in advance,
Ann
I am in the midst of refactoring my DITA files to set the top-level topic id to match the file name so that it is both unique and informative. I have managed to allow many duplicate topic ids proliferate over time

This is proving a tedious process and I wonder is there any short-cut to achieving this rather than doing each file manually?
Thanks in advance,
Ann
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate topic ID to match file name
Hi Ann,
We do not have right now an automated way to change a topic's ID and automatically change it in all references made to that topic. We have a registered issue and I added your feedback on it.
If you contact us via our email address (support@oxygenxml.com) I could try to give you a custom refactoring action which renames IDs in all topics to use the file name (without extension). The refactoring action will not rename also references to those IDs from other topics. So you will still need to run the "Validate and check for completeness" action and manually fix all those broken links.
Speaking of the "Validate and check for completeness" action, it can also validate each topic using a Schematron schema. So you can add schematron checks for this condition (topic ID not matching file name) and you can run the "Validate and check for completeness" action to find all the topics where you should change the ID.
Regards,
Radu
We do not have right now an automated way to change a topic's ID and automatically change it in all references made to that topic. We have a registered issue and I added your feedback on it.
If you contact us via our email address (support@oxygenxml.com) I could try to give you a custom refactoring action which renames IDs in all topics to use the file name (without extension). The refactoring action will not rename also references to those IDs from other topics. So you will still need to run the "Validate and check for completeness" action and manually fix all those broken links.
Speaking of the "Validate and check for completeness" action, it can also validate each topic using a Schematron schema. So you can add schematron checks for this condition (topic ID not matching file name) and you can run the "Validate and check for completeness" action to find all the topics where you should change the ID.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate topic ID to match file name
Hi Danielle,
Oxygen 18.1 (which we plan to release in about a week) will come bundled with a default DITA refactoring action which replaces all topic IDs with the file name. Basically, you will open the main DITA Map in the DITA Maps Manager view, right click, choose Refactoring->XML Refactoring and you will find two DITA-related predefined actions, one of which is called Change topic ID to file name. The refactoring actions also have a Preview which allow you to see what the action will be doing before making changes on disk.
If you are using Oxygen 18.0 I can also provide you this refactoring action so that you can install it in your current Oxygen installation. So if you do not want to wait for the release just drop us an email (support@oxygenxml.com)
Regards,
Radu
Oxygen 18.1 (which we plan to release in about a week) will come bundled with a default DITA refactoring action which replaces all topic IDs with the file name. Basically, you will open the main DITA Map in the DITA Maps Manager view, right click, choose Refactoring->XML Refactoring and you will find two DITA-related predefined actions, one of which is called Change topic ID to file name. The refactoring actions also have a Preview which allow you to see what the action will be doing before making changes on disk.
If you are using Oxygen 18.0 I can also provide you this refactoring action so that you can install it in your current Oxygen installation. So if you do not want to wait for the release just drop us an email (support@oxygenxml.com)
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate topic ID to match file name
Hi,
Oxygen 18.1 was released a couple of weeks ago and it should come bundled with this special refactoring action we discussed.
Regards,
Radu
Oxygen 18.1 was released a couple of weeks ago and it should come bundled with this special refactoring action we discussed.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Generate topic ID to match file name
Hi Sathya,
If you drop us an email (support@oxygenxml.com) I could try to give you the XML refactoring actions as separate files so that you could install them in 17.1.
Regards,
Radu
If you drop us an email (support@oxygenxml.com) I could try to give you the XML refactoring actions as separate files so that you could install them in 17.1.
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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