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

RE: JTidy as an error reporter

From: Brian Zimmer <bzimmer@ignitemedia.com>
Date: Tue, 29 Aug 2000 13:28:05 -0500
Message-ID: <1AC60639CC71D4118A0B009027AFC9A80D02C8@GEORGIA>
To: "'Andy Quick'" <ac.quick@sympatico.ca>, html-tidy@w3.org
Those methods only give me the number of errors/warnings.  I would like to
be able to take the input from the user and coupled with the diagnostics
from JTidy, highlight the row of the offending error.  I suppose I could
write to the PrintWriter and then parse it, but JTidy already has this
information.  Is there anyway to get a list of objects containing all the
error row, col and msgs?



-----Original Message-----
From: Andy Quick [mailto:ac.quick@sympatico.ca]
Sent: Monday, August 28, 2000 8:37 PM
To: html-tidy@w3.org
Subject: Re: JTidy as an error reporter

You can use Tidy.getParseErrors() or Tidy.getParseWarnings()
to get the error/warning count after a call to Tidy.parse().

You could also use Tidy.setErrout(p) to set the error output to
go to a PrintWriter p.

Andy Quick

----- Original Message -----
From: Brian Zimmer <bzimmer@ignitemedia.com>
To: <html-tidy@w3.org>
Sent: Monday, August 28, 2000 6:11 PM
Subject: JTidy as an error reporter

> One of the requirements of our application is to accept end user's html.
> a number of cases this html is poorly written/generated and I'd like to be
> able to inform the user of such and prohibit acceptance until it's
> written.
> I'd like to use JTidy wrapped in a JSP tag to handle this but the api
> a little confusing to me.  I can instantiate JTidy but none of the public
> methods seem to be what I want.  Instead, I find myself ripping out code
> from main or instantiating a StreamInImpl so I can use a the Lexer
> and look for errors.  However this seems less than optimal.  What I really
> want is a list of errors as objects such as would be written to stderr.
> I missing something entirely or is this not really how JTidy is designed?
> thanks,
> brian
> <signature>
> <name>brian zimmer</name>
> <email>bzimmer <at/> ignitemedia <dot/> com</email>
> <voice>773.293.4344</voice>
> </signature>
Received on Tuesday, 29 August 2000 14:25:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:48 UTC