Batch Refactoring > Rename Resource
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 49
- Joined: Mon Jun 13, 2016 11:23 am
Batch Refactoring > Rename Resource
Post by Graham Hannington »
I want to rename all of the .dita files that a .ditamap refers to. I want Oxygen to automatically change all references, including cross-references, to the old file names to the new file names.
I can do this in Oxygen interactively, one file at a time, using Refactoring > Rename/Move Resource. That's great; very helpful.
Now, what's the easiest/quickest/best way to automate that "Refactoring > Rename/Move Resource" function?
I can prepare a file containing the original and desired file names in any format necessary.
I'm open to writing code. I've written automation macros/scripts for many other applications (e.g. MS Office VBA). I've just never tried custom automation with Oxygen before.
I can do this in Oxygen interactively, one file at a time, using Refactoring > Rename/Move Resource. That's great; very helpful.
Now, what's the easiest/quickest/best way to automate that "Refactoring > Rename/Move Resource" function?
I can prepare a file containing the original and desired file names in any format necessary.
I'm open to writing code. I've written automation macros/scripts for many other applications (e.g. MS Office VBA). I've just never tried custom automation with Oxygen before.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Batch Refactoring > Rename Resource
Hi Graham,
I'm afraid we do not have an out of the box solution to batch refactor content based on certain criteria.
Oxygen does have support for plugins (Java based) and for XSLT-based XML refactoring scripts.
There is an example here for renaming file name prefixes in a DITA topic:
https://github.com/oxygenxml/dita-refac ... 20prefixes
in that example first an ANT script is run to rename the files on disk:
https://github.com/oxygenxml/dita-refac ... Topics.xml
and then a custom XSLT refactoring script is performed on each topic to rename the references (in conrefs and xrefs):
https://github.com/oxygenxml/dita-refac ... efixes.xsl
More about custom XML refactoring actions in Oxygen:
https://www.oxygenxml.com/doc/versions/ ... tools.html
Regards,
Radu
I'm afraid we do not have an out of the box solution to batch refactor content based on certain criteria.
Oxygen does have support for plugins (Java based) and for XSLT-based XML refactoring scripts.
There is an example here for renaming file name prefixes in a DITA topic:
https://github.com/oxygenxml/dita-refac ... 20prefixes
in that example first an ANT script is run to rename the files on disk:
https://github.com/oxygenxml/dita-refac ... Topics.xml
and then a custom XSLT refactoring script is performed on each topic to rename the references (in conrefs and xrefs):
https://github.com/oxygenxml/dita-refac ... efixes.xsl
More about custom XML refactoring actions in Oxygen:
https://www.oxygenxml.com/doc/versions/ ... tools.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Site Admin
- Posts: 125
- Joined: Wed Dec 12, 2018 5:33 pm
Re: Batch Refactoring > Rename Resource
Post by Cosmin Duna »
Hello,
I just wanted to let you know that Oxygen 23.1 is out now and it contains a new script for running XML refactoring operations. See the following link for more information: https://www.oxygenxml.com/doc/versions/ ... oring.html
Best regards,
Cosmin
I just wanted to let you know that Oxygen 23.1 is out now and it contains a new script for running XML refactoring operations. See the following link for more information: https://www.oxygenxml.com/doc/versions/ ... oring.html
Best regards,
Cosmin
Cosmin Duna
<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