Scripting a multi-step search and replace
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 18
- Joined: Tue Jun 11, 2019 9:01 pm
Scripting a multi-step search and replace
Post by jeff_hooker »
Hi folks,
I've got roughly 200 different character entities that I need to search for and replace with different entities across a document set of roughly 15000 topics. Is there any way of defining the search/replace terms as a set of comma separated values or something for the multi-file search feature and then running the whole search at once?
Thanks,
Jeff.
I've got roughly 200 different character entities that I need to search for and replace with different entities across a document set of roughly 15000 topics. Is there any way of defining the search/replace terms as a set of comma separated values or something for the multi-file search feature and then running the whole search at once?
Thanks,
Jeff.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Scripting a multi-step search and replace
Hi Jeff,
Oxygen has support to create and apply custom XML refactoring operations over multiple files:
https://www.oxygenxml.com/doc/versions/ ... tools.html
We have a sample Github project with various XSLT-based XML Refactoring operations:
https://github.com/oxygenxml/dita-refactoring-examples
I created there a folder with a sample XML refactoring operation which replaces two entity references with two equivalents:
https://github.com/oxygenxml/dita-refac ... References
maybe you can use that as a starting point for what you want and make extra changes to the XSLT stylesheet.
In the Oxygen Preferences->"XML Refactoring" page you can add a reference to a custom folder containing refactoring operations.
Then in the main Oxygen menu Tools->"XML Refactoring" dialog you should find the new "Replace entities" XML refactoring action.
Regards,
Radu
Oxygen has support to create and apply custom XML refactoring operations over multiple files:
https://www.oxygenxml.com/doc/versions/ ... tools.html
We have a sample Github project with various XSLT-based XML Refactoring operations:
https://github.com/oxygenxml/dita-refactoring-examples
I created there a folder with a sample XML refactoring operation which replaces two entity references with two equivalents:
https://github.com/oxygenxml/dita-refac ... References
maybe you can use that as a starting point for what you want and make extra changes to the XSLT stylesheet.
In the Oxygen Preferences->"XML Refactoring" page you can add a reference to a custom folder containing refactoring operations.
Then in the main Oxygen menu Tools->"XML Refactoring" dialog you should find the new "Replace entities" XML refactoring action.
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