Is Rapid Fire Tag Assignment Possible?

Oxygen general issues.
Ivan

Is Rapid Fire Tag Assignment Possible?

Post by Ivan »

Howdy,
Totally new to Oxygen Author. However, I'm curious if the following feature is available.

If I have 50 lines of text that all require the same opening and closing <item></item> tag assignment, does Oxygen Author have a feature that will let one highlight all 50 lines of text and then assign the same tag to all 50 lines of text in a single rapid fire tag assignment operation?

Such a feature would be very cool and very helpful. Nevertheless, is it already included in Oxygen Author, or does such an automation feature somehow require it be scripted?

Any info will be greatly appreciated.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Is Rapid Fire Tag Assignment Possible?

Post by adrian »

Hello,

So, If I understand correctly, you have several lines of text that you want each to be surrounded by an "item" tag.
Like this?

Code: Select all

line1
line2
line3
...
=>

Code: Select all

<item>line1</item>
<item>line2</item>
<item>line3</item>
...
Is that correct?

In Text mode(where lines are distinct) you can do this with the help of Find -> Find/Replace.
Select all the lines that you want to process and in the Find/Replace dialog select "Scope: Only selected lines". This will highlight only the affected lines. Then use:
Text to find: .*
Replace with: <item>$0</item>
Regular expression - enabled
Press Replace All and all the lines will be surrounded with an item tag.

If you want to keep the whitespace indent in front of the text of each line you could use:
Text to find: (\s+)(.*)
Replace with: $1<item>$2</item>

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Ivan

Re: Is Rapid Fire Tag Assignment Possible?

Post by Ivan »

Adrian,
Thanks a lot for your reply. You understood me perfectly. I tested it out both in Oxygen and NotePad++ and I am blown away. This capability Oxygen has makes it in my opinion a very robust application. I could see myself being more productive with this feature alone. NotePad++ supports expressions, but I don't think it is possible to duplicate the same result since it lacks Oxygen's Scope feature.

Thanks again.
:D
Post Reply