cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

changing tags

lhales
1-Newbie

changing tags



Good morning folks,

I am resurrecting a topic from last week. Don't ask what happened, I tried
sending this from home on Sunday and it seems to have gotten lost in the
ether (or is that nether) world.

I mentioned that you could globally change tags in ACL last week when
Gabriel asked about it. Well I thought I had done something like that in
ACL when I was first learning how to use it. Well, I was half right. I
had a script to globally change an attribute, which I have successfully
modified to change a tag, including verify if the tag is valid in the DTD
(but not necessarily valid at the insertion point [what??? you want
everything???? 🙂 ]).

I had some embellishments in the script for the attribute changes that were
not working for element, so I took them out. Anyway, this script prompts
you for the name of the element you want to change, the name of the element
that will replace it. The script then checks the validity of the
replacement element. If the element is not in the DTD, you get a chance to
change it. If you don't do it right the second time, then the script
exits. The script will also exit if both the element variable values are
left blank. The script then goes through the file changing elements and
counting the number of changes.

When I ran my simple test, I got the same number of changes each time. I
did the change then undid it with the script.

Enjoy

Lynn

(See attached file: chgtag.acl)
2 REPLIES 2

Overwhelmed by the many helps, thank you all!!

PS Lynn, your script works perfectly: a zillion thanks!

-----Mensaje original-----

Hi Lynn,

Thanks for the script. I'll have to try it.

Greg
🙂

>>> lhales@csc.com 10/05/04 08:49AM >>>

Good morning folks,

I am resurrecting a topic from last week. Don't ask what happened, I
tried
sending this from home on Sunday and it seems to have gotten lost in
the
ether (or is that nether) world.

I mentioned that you could globally change tags in ACL last week when
Gabriel asked about it. Well I thought I had done something like that
in
ACL when I was first learning how to use it. Well, I was half right.
I
had a script to globally change an attribute, which I have
successfully
modified to change a tag, including verify if the tag is valid in the
DTD
(but not necessarily valid at the insertion point [what??? you want
everything???? 🙂 ]).

I had some embellishments in the script for the attribute changes that
were
not working for element, so I took them out. Anyway, this script
prompts
you for the name of the element you want to change, the name of the
element
that will replace it. The script then checks the validity of the
replacement element. If the element is not in the DTD, you get a
chance to
change it. If you don't do it right the second time, then the script
exits. The script will also exit if both the element variable values
are
left blank. The script then goes through the file changing elements
and
counting the number of changes.

When I ran my simple test, I got the same number of changes each time.
I
did the change then undid it with the script.

Enjoy

Lynn

(See attached file: chgtag.acl)
Announcements