Find/Replace Help. Neophyte OS X user
Oxygen general issues.
-
- Posts: 47
- Joined: Mon Jun 26, 2006 10:40 pm
Find/Replace Help. Neophyte OS X user
I am editing letters transcribed into TEI XML with Oxygen. Our grant project recently had to go through the process of renaming all of the image files for these letters, so now we have to change the <pg ref> tags to match.
Is there a way to use Find/Replace with a variable? What I'd like to do is this:
(origninal file name) rsl002a changed to (new file name) arm03020002001.
I can find, for example, "rsl" or "arm" but I need to find rsl003d and change it to something like arm03020003004. I'm slightly familiar with AppleScript, can I use this to accomplish this task if Find/Replace won't do it?
I apologize if this question makes people smack their foreheads is disbelief. We've got a lot of letters to edit, and if we can automate the process somewhat, it'll be a huge timesaver.
Thanks for your help,
Bridger
OS X 10.3.9, oxygen 7.2
Is there a way to use Find/Replace with a variable? What I'd like to do is this:
(origninal file name) rsl002a changed to (new file name) arm03020002001.
I can find, for example, "rsl" or "arm" but I need to find rsl003d and change it to something like arm03020003004. I'm slightly familiar with AppleScript, can I use this to accomplish this task if Find/Replace won't do it?
I apologize if this question makes people smack their foreheads is disbelief. We've got a lot of letters to edit, and if we can automate the process somewhat, it'll be a huge timesaver.
Thanks for your help,
Bridger
OS X 10.3.9, oxygen 7.2
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
The Find/Replace support is able to reuse regular expression groups from a find match in the replace expression, for example if you match rsl003d with the find expression rsl(\d{3})(.+?)(\s*) and the replace expression is arm0302$1004$3 after replacement you get arm0302003004. You did not specify other connection between the match and the result of the replacement but if you need more than reuse of the groups, for example to replace a group of the match ($1, that is 003) with number($1) + 1 (that is 004) you should use an XSLT stylesheet to rename all the image files in your TEI XML documents.
Regards,
Sorin
The Find/Replace support is able to reuse regular expression groups from a find match in the replace expression, for example if you match rsl003d with the find expression rsl(\d{3})(.+?)(\s*) and the replace expression is arm0302$1004$3 after replacement you get arm0302003004. You did not specify other connection between the match and the result of the replacement but if you need more than reuse of the groups, for example to replace a group of the match ($1, that is 003) with number($1) + 1 (that is 004) you should use an XSLT stylesheet to rename all the image files in your TEI XML documents.
Regards,
Sorin
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