Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Icon > Re: scanning en...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 179 of 189
Post > Topic >>

Re: scanning environments

by Thomas Crone <tomnjan@[EMAIL PROTECTED] > Apr 7, 2008 at 10:27 PM

Thanks for your response; sorry I'm late getting back.

Steve Wampler wrote:
> Thomas Crone wrote:
> 
>> Is there a way I can modify the &subject and &pos of the Line ? 
>> environment while I'm in the tag ? environment?
> 
> 
> There's no easy way to do this.  Scanning environments are isolated
> from each other.  
 >
 > ...
> 
> Can you provide some specifics on what you're trying to do that
> makes this action desirable?  Maybe there's another approach.

I am adapting a program from the Icon website, chkhtml.icn (that
checked an HTML file) to remove unnecessary tags. This started when
I tried to print a web site, got garbage, and looked at the html
source (written by MS Office :-) ). It has lots of stuff like:

<font size=...><font size=...><font size=...></font></font></font>

nested, equivalent tags, often with no content inside them.

The original program had a Line ? {    } environment, looking at a
line from the html file. When it found a "<" it did a
  tag := tab(find(">"))  with mods for multi-line tags, etc;
then went to a tag ? {   } environment to get any "/", then tag
name, etc. So I was in the tag ? environment when I found the </font>
with no content, and wanted to delete the <font size=...></font>
from the input line.

Instead I made a GetTag procedure that found the ">", and returned
an endFlag, TagName, and Attributes back to the Line ? environment.

When does Icon go back from an "inner" environment to the outer?
I presume at least at the end of the "block" the inner serch started in?
For example,

Line ? {
    ...
    {
       tag ? {
          ...
       }
       # are there any cases where we would be back to Line ? here?
    }
    # here we would be definitely back to the Line ? environment?
}
 




 4 Posts in Topic:
scanning environments
Thomas Crone <tomnjan@  2008-04-01 19:06:46 
Re: scanning environments
Steve Wampler <swample  2008-04-02 08:51:34 
Re: scanning environments
Thomas Crone <tomnjan@  2008-04-07 22:27:40 
Re: scanning environments
Steve Wampler <swample  2008-04-08 08:03:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:36:11 CDT 2008.