W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

Re: Filter question/problem

From: Jeff Dripps <jeff@macalot.com>
Date: Fri, 9 Aug 1996 16:54:33 -0400
Message-Id: <v01540b09ae31545c9598@[207.18.93.30]>
To: pasdif@netfly.it
Cc: www-jigsaw@w3.org
>Jeff Dripps wrote:
>>
>> Hi folks,
>>
>> I wrote a really simple filter that I thought would be great for end users
>> configuring Jigsaw. It's purpose was to eliminate having to hand type many
>> of the admin URLs discussed in the configuration tutorials. It's goal was
>> to replace embedded tags with the users actual host name and port number in
>> any html document the filter was applied to. For example in the
>> configuration.html example below, the tag <!--your.host.name--> is
>> replaced, resulting in the ability to just click the link to configure
>> rather than copy/paste it in.
>
>Very good.
>
>Your code is very similar to my ImageCountFilter. You can see the code
>at
>address http://www.netfly.it:8080/Extents/src/ImageCountFilter.java
>
>If the next tag is into same line, don't work becouse the following code
>test for one tag for line
>
>while ((strTmp = ds.readLine()) != null) {
>   //  System.out.println(strTmp);
>
>
>   // test if the line contains URL_TAG
>   if ((nPos = strTmp.indexOf(URL_TAG)) != -1) {
>       System.out.println("host tag found");
>
>       // replace the tag with host info
>       strTmp = insertURL(request, strTmp, nPos);
>   }
>
>...
>...
>
>Loop on line for test other tags
>
>
>Regards
>Pasquale

Yes, thank you Pasquale for your ImageCountFilter code example. I'm already
using it in my pages and I did use it as a template for my simple filter.
Also you were correct, I was attempting to have multiple tags in the same
line. That was the problem. Thanks again for your code contribution. It
helped a lot in my learning about filters. sinc, -jeff
Received on Friday, 9 August 1996 16:55:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT