Re: Request for Tidy to ignore 'user defined' tags

Here's a sed script that is self inverting.

 #!/usr/bin/sed -f
 s/<span class="tango">\([^<]*\)<\/span>/<@\1>/g;t
 s/<@\([^>]*\)>/<span class="tango">\1<\/span>/g

Eric Blossom wrote:

> Rick Jelliffe has been asking for such a feature in greater generality.
> Until it is put in, may I suggest a work around?
>
> Using Perl, AWK, or even (God forbid) sed, make two filters.
> The first to convert your (Tango's) processing instructions into <span>
> tags.
> e.g. <@include file> becomes <span class="tango">include file</span>
> The second script should invert this process.  Wrapping tidy in these
> scripts should get you where you want to go today.
>
> Bill Sowers wrote:
>
> > Dave,
> >
> > I discovered HTML-Kit at build 242 and would really like to use the Tidy
> >
> > tool more extensively but I need the ability to somehow tell Tidy to
> > ignore certain character strings.
> >
> > In my world, I use an IDE called Tango (www.pervasive.com) to develop
> > applications that connect databases to users via html pages and forms.
> > Tango is a drag-and-drop development tool that generates the html code.
> > For example, Tango has a tag <@include> that allows me to insert text
> > files into the
> > Tango file so at run time the Tango server sees the included file as
> > part of the Tango file.
> >
> > I like to use Tidy to clean up and verfiy the html generated by Tango.
> > Unfortunately, when I run the Tango generated code through build 242 I
> > get a warning and nothing appears in the output section.  I have to
> > remove the <@include> tags to get output.
> >
> > In build 248 no warning is generated (good) but it converts the '<' and
> > '>' marks to '&lt;' and '&gt;' respectively.  This is not what I need.
> >
> > Similarly, we use a product called NetCloak (www.maxum.com).  This
> > product acts in a manner similar to server-side includes.  You put into
> > your html code the NetCloak command and, at the time of serving up,
> > NetCloak makes the appropriate subsitution.  For example, <insert_time>
> > will insert a time (depending upon the parameters you choose).  The
> > point is, in my environment, these character strings do something
> > useful, but they are not 'valid' html.
> >
> > To me these are useful and valid codes.  I want the ability to add
> > certain character strings to Tidy and have it ignore that character
> > string when it finds it in a file it is examining.  It should do nothing
> >
> > to it.  No changes.  Just leave it alone.
> >
> > Perhaps I have missed a setting, if so, please tell me.  Otherwise,
> > please consider adding this capability to a near-time build (of course I
> >
> > want it yesterday :^) ).
> >
> > Thanks,
> >
> > Bill Sowers
> > sowersb@baxter.com
>
> --
> Eric

--
Eric

Received on Wednesday, 30 June 1999 17:39:37 UTC