"Find/Replace in Files" in Author Action?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
"Find/Replace in Files" in Author Action?
Post by Frank Ralf »
Hi,
I have a rather dangerous regular expression for Find/Replace in Files and would like to provide the function via an Author Action instead of letting the users enter the regex manually. Is there an Author Default Operation available for that?
TIA
Frank
I have a rather dangerous regular expression for Find/Replace in Files and would like to provide the function via an Author Action instead of letting the users enter the regex manually. Is there an Author Default Operation available for that?
TIA
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Find/Replace in Files" in Author Action?
Hi Frank,
Sorry, we do not have such an operation.
Do you want to search for certain content or to replace content?
Also the Find Replace in Files is performed directly over the XML content, it can match tag names as well as text content. Does your regexp also match tag names?
The Author editing mode has an internal node structure so you cannot search in it using our API directly strings like. So probably this could be implemented by a custom Java operation but the operation would approach the problem in a slightly different way, navigate all nodes and possibly apply the regexp pattern on the text content which is between them.
Regards,
Radu
Sorry, we do not have such an operation.
Do you want to search for certain content or to replace content?
Also the Find Replace in Files is performed directly over the XML content, it can match tag names as well as text content. Does your regexp also match tag names?
The Author editing mode has an internal node structure so you cannot search in it using our API directly strings like
Code: Select all
<tag>text</tag>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: "Find/Replace in Files" in Author Action?
Post by Frank Ralf »
Thanks for the information, Radu. I will try the other options you mention.
Kind regards,
Frank
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: "Find/Replace in Files" in Author Action?
Post by Frank Ralf »
Hi,
This request pops up again from time to time. So is this perhaps possible with more recent versions of oxygen?
Best regards,
Frank
This request pops up again from time to time. So is this perhaps possible with more recent versions of oxygen?
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Find/Replace in Files" in Author Action?
Hi Frank,
I'm trying to better understand your needs. Let's say there would be a pre-defined Author operation, what parameters would it take, what would it do with them? Would it also change XML structure or only text content between tags?
Regards,
Radu
I'm trying to better understand your needs. Let's say there would be a pre-defined Author operation, what parameters would it take, what would it do with them? Would it also change XML structure or only text content between tags?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: "Find/Replace in Files" in Author Action?
Post by Frank Ralf »
Hi Radu,
Thanks for your quick response. I need an action where the user can perform a complex find and replace operation with pre-configured regular expression find/replace patterns. The user should not be able to alter the find/replace patterns. Here's an example:
Find
Replace with
Hope this clarifies things.
Best regards,
Frank
Thanks for your quick response. I need an action where the user can perform a complex find and replace operation with pre-configured regular expression find/replace patterns. The user should not be able to alter the find/replace patterns. Here's an example:
Find
Code: Select all
href="references.dita#[^"]+"\s*>\s*Ref\.\s+(\d+)\s*</xref>
Code: Select all
keyref="references/ref\1" />
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Find/Replace in Files" in Author Action?
Hi Frank,
I would suggest you create a custom XML refactoring operation based on XSLT:
https://www.oxygenxml.com/doc/versions/ ... tools.html
Such refactoring operations can also be provided at framework level. For example the Dita framework configuration has a special folder with custom DITA refactor actions:
OXYGEN_INSTALL_DIR\frameworks\dita\refactoring
Once defined for a framework, when you open a DITA topic you can right click inside it and there is a special "Refactoring" submenu where you will find the new added action.
An example of a custom XSLT refactor operation which can be applied on a DITA Map:
http://blog.oxygenxml.com/2018/01/sorti ... okmap.html
Regards,
Radu
I would suggest you create a custom XML refactoring operation based on XSLT:
https://www.oxygenxml.com/doc/versions/ ... tools.html
Such refactoring operations can also be provided at framework level. For example the Dita framework configuration has a special folder with custom DITA refactor actions:
OXYGEN_INSTALL_DIR\frameworks\dita\refactoring
Once defined for a framework, when you open a DITA topic you can right click inside it and there is a special "Refactoring" submenu where you will find the new added action.
An example of a custom XSLT refactor operation which can be applied on a DITA Map:
http://blog.oxygenxml.com/2018/01/sorti ... okmap.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: "Find/Replace in Files" in Author Action?
Post by Frank Ralf »
Hi Radu,
Many thanks for the pointer.
Best regards,
Frank
Many thanks for the pointer.
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
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