I need help. I have a macro created to go through a file and replace any acronym with a processing instruction. This works fine, but the problem is I need this not to replace the acronyms inside of frame tags or title tags, and most importantly not inside of another processing instruction.
Sample Text:
<?FRAME ID='2-2.2' TITLE='2.2 ABCD SYSTEM OVERVIEW (CONTINUED)' SHOWNO='Y' NEXT='2-2.2.1'><?BUTTON POS='12' SHOW='Y' LABEL='Acronyms' TYPE='FRAME' LINK='y_acronym.sgm!4-80' BITMAP='N' DESC='List of Acronyms'>
<para0><title>2.2 ABCD SYSTEM OVERVIEW (CONTINUED).</title>
<para><paratext>The ABCD can be described using two levels of building blocks: components and subsystems. The smallest building block is at the component level. There are five classes of components:</paratext></para>
<Randlist>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
</Randlist>
<para><paratext>Owens and McNabb haven't been on speaking terms throughout the preseason, but the All-Pro wide receiver said Tuesday in an interview on ESPN that he plans to talk to McNabb before Philadelphia's season opener at Atlanta on Monday night.</paratext></para>
<Randlist>
<item>• <symbol><?HOTSPOT color="blue" linktype="message" HREF="!ABCD and Display Subsystem.txt" TITLE="ABCD and Display Subsystem"?>ABCD and Display Subsystem (ABCD)<?/hotspot></symbol></item>
<item>• <symbol><?HOTSPOT color="blue" linktype="message" HREF="!ABCD Data Subsystem.txt" TITLE="ABCD Data Subsystem"?>ABCD Data Subsystem (ABCD)<?/hotspot></symbol></item>
<item>• <symbol><?HOTSPOT color="blue" linktype="message" HREF="!ABCD Subsystem.txt" TITLE="ABCD Subsystem"?>ABCD Subsystem (ABCD)<?/hotspot></symbol></item>
</Randlist>
</para0>
Script using:
InsertMode
ColumnModeOff
HexOff
UnixReOn
Top
Find RegExp "Alphabet Soup [(]ABCD[)]"
Replace All "<?HOTSPOT color="violet" linktype="message" href="&abcd;" POPUP="1">ABCD<?/HOTSPOT>"
The script traverses through the file and will replace all instances of the acronym, but I need it to be selective. Either someway exclude certain tags (<frame>, <title>) or tell it only to do this action within certain tags (<paratext>. <symbol>).
This is only one acronym, in the actual script there are more than 400.
Your help on this is greatly appreciated.
Thanks, Max
Sample Text:
<?FRAME ID='2-2.2' TITLE='2.2 ABCD SYSTEM OVERVIEW (CONTINUED)' SHOWNO='Y' NEXT='2-2.2.1'><?BUTTON POS='12' SHOW='Y' LABEL='Acronyms' TYPE='FRAME' LINK='y_acronym.sgm!4-80' BITMAP='N' DESC='List of Acronyms'>
<para0><title>2.2 ABCD SYSTEM OVERVIEW (CONTINUED).</title>
<para><paratext>The ABCD can be described using two levels of building blocks: components and subsystems. The smallest building block is at the component level. There are five classes of components:</paratext></para>
<Randlist>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
<item>• <symbol>Owens and McNabb</symbol></item>
</Randlist>
<para><paratext>Owens and McNabb haven't been on speaking terms throughout the preseason, but the All-Pro wide receiver said Tuesday in an interview on ESPN that he plans to talk to McNabb before Philadelphia's season opener at Atlanta on Monday night.</paratext></para>
<Randlist>
<item>• <symbol><?HOTSPOT color="blue" linktype="message" HREF="!ABCD and Display Subsystem.txt" TITLE="ABCD and Display Subsystem"?>ABCD and Display Subsystem (ABCD)<?/hotspot></symbol></item>
<item>• <symbol><?HOTSPOT color="blue" linktype="message" HREF="!ABCD Data Subsystem.txt" TITLE="ABCD Data Subsystem"?>ABCD Data Subsystem (ABCD)<?/hotspot></symbol></item>
<item>• <symbol><?HOTSPOT color="blue" linktype="message" HREF="!ABCD Subsystem.txt" TITLE="ABCD Subsystem"?>ABCD Subsystem (ABCD)<?/hotspot></symbol></item>
</Randlist>
</para0>
Script using:
InsertMode
ColumnModeOff
HexOff
UnixReOn
Top
Find RegExp "Alphabet Soup [(]ABCD[)]"
Replace All "<?HOTSPOT color="violet" linktype="message" href="&abcd;" POPUP="1">ABCD<?/HOTSPOT>"
The script traverses through the file and will replace all instances of the acronym, but I need it to be selective. Either someway exclude certain tags (<frame>, <title>) or tell it only to do this action within certain tags (<paratext>. <symbol>).
This is only one acronym, in the actual script there are more than 400.
Your help on this is greatly appreciated.
Thanks, Max