W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

Re: adding tags in JTidy

From: Michael Ryan Bannon <mrbannon@student.math.uwaterloo.ca>
Date: Tue, 21 Aug 2001 09:33:25 -0400
Message-ID: <3B826325.AD762343@student.math.uwaterloo.ca>
To: Gary L Peskin <garyp@firstech.com>
CC: html-tidy@w3.org
Sounds good...thanks.

Gary L Peskin wrote:

> Michael --
>
> You have a few ways to go.  Since JTidy is open source, you can hack up
> the source yourself to automatically do something with unrecognized
> tags.  This may even be a feature request for HTML Tidy, which you can
> check on the SourceForge site.
>
> Or, you can have a look at what TagTable.java does for
>   defineInlineTag
>   defineBlockTag
>   defineEmptyTag
>   definePreTag
>
> and create the Dict object and install it in the TagTable yourself.
> You'll somehow need to decide what kind of tag the unrecognized tag is.
>
> Gary
>
> Michael Ryan Bannon wrote:
> >
> > Thanks...one more question
> >
> > Is there a method I can call from Tidy that takes the actual tag as the
> > argument?
> > Here's the situation: i'm using JTidy in my own Java app to clean a file.
> > JTidy finds a tag it doesn't recognize and gives me an error.  So, I get the
> > unknown tag from that error and attempt to let JTidy know that it SHOULD
> > recognize this tag.
> > I guess what I'm saying is, I want to make sure I find this easiest, most
> > elegent way to handle this.
> >
> > thanks,
> >
> > ryan
> >
> > Gary L Peskin wrote:
> >
> > > Michael --
> > >
> > > The config file is the same config file in both HTML Tidy and JTidy.  If
> > > you're not using the command line, you can set the config file in JTidy
> > > with Tidy.setConfigurationFromFile(String filename).
> > >
> > > Gary
> > >
> > > Michael Ryan Bannon wrote:
> > > >
> > > > Hello all,
> > > >
> > > > i know in HTMLTidy you can set your config file to recognize unknown
> > > > tags by specifying those tags.  Is there a similar option in JTidy?  I
> > > > couldn't find one, but such an option would be great.
> > > >
> > > > thanks,
> > > >
> > > > ryan
Received on Tuesday, 21 August 2001 09:30:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:46 GMT