Making Search and Replace Scripts, Buttons, and Macros
Oxygen general issues.
-
- Posts: 1
- Joined: Wed Mar 05, 2025 5:38 am
- Contact:
Making Search and Replace Scripts, Buttons, and Macros
Hello! To convert DOCX files to XML for Braille creation, I'm using Oxygen XML 24.1. To search for and replace particular characters and groups of characters based on predetermined rules, I would love to write some scripts, buttons, or macros. For instance, when a "+" is followed by spaces or other combinations and just digits remain.
Are there any videos, tutorials, or other resources that anyone knows of that could be useful for these tasks? Since I occasionally handle up to 20 documents per day, each with a variety of permutations, I wish to speed this procedure. I'm grateful.
Are there any videos, tutorials, or other resources that anyone knows of that could be useful for these tasks? Since I occasionally handle up to 20 documents per day, each with a variety of permutations, I wish to speed this procedure. I'm grateful.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Making Search and Replace Scripts, Buttons, and Macros
Hi,
The ".docx" file is an archive, it can be opened in the Oxygen Archive browser view and contains inside a "document.xml". I assume you are converting it to your own XML vocabulary. How did you do that? Did you create an XSLT stylesheet which when applied on the document.xml creates the XML document you are interested in?
Oxygen's free batch documents converter add-on can convert Word to XHTML or DITA XML if you want to get to an XML format which may be closer to your target XML vocabulary and easier to process:
https://www.oxygenxml.com/doc/ug-addons ... addon.html
About your search/replace needs, do you need those in order to further post process the text in the converted XML document.
Oxygen's Find/Replace dialog has support to enable regular expression matching:
https://www.oxygenxml.com/doc/versions/ ... ialog.html
If you are not familiar with regexp matching maybe you can use ChatGPT to generate regular expressions based on your needs, give it an example of what you want to match, ask for a regular expression pattern and then use it in Oxygen's Find/Replace dialogs.
Regards,
Radu
The ".docx" file is an archive, it can be opened in the Oxygen Archive browser view and contains inside a "document.xml". I assume you are converting it to your own XML vocabulary. How did you do that? Did you create an XSLT stylesheet which when applied on the document.xml creates the XML document you are interested in?
Oxygen's free batch documents converter add-on can convert Word to XHTML or DITA XML if you want to get to an XML format which may be closer to your target XML vocabulary and easier to process:
https://www.oxygenxml.com/doc/ug-addons ... addon.html
About your search/replace needs, do you need those in order to further post process the text in the converted XML document.
Oxygen's Find/Replace dialog has support to enable regular expression matching:
https://www.oxygenxml.com/doc/versions/ ... ialog.html
If you are not familiar with regexp matching maybe you can use ChatGPT to generate regular expressions based on your needs, give it an example of what you want to match, ask for a regular expression pattern and then use it in Oxygen's Find/Replace dialogs.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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