Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 76547 invoked from network); 25 Jul 2000 14:59:02 -0000 Received: from vortex.more.net (198.209.253.169) by locus.apache.org with SMTP; 25 Jul 2000 14:59:02 -0000 Received: from voyager.apg.more.net (b5fan.spg.more.net [207.160.133.142]) by vortex.more.net (8.9.3/8.9.3) with ESMTP id JAA15409 for ; Tue, 25 Jul 2000 09:59:01 -0500 (CDT) Sender: glenn@more.net Message-ID: <397DAB35.36FD912B@voyager.apg.more.net> Date: Tue, 25 Jul 2000 09:59:01 -0500 From: Glenn Nielsen Organization: MOREnet X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.7 i86pc) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: [PROPOSAL] Jasper, Use XML parser to improve error reporting of JSP taglib problems References: <20000725144324.27669.qmail@web204.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I will be happy to sacrifice some speed for a one time compile to have much more robust error reporting. Glenn Nick Bauman wrote: > > Sounds like it would be slooooow. > > --- Eduardo Pelegri--Llopart > wrote: > > > > Proposal: > > > > > > Use an XML Parser to do validation of JSP pages > > which use a taglib. > > > An XML Parser does a much better job of reporting > > malformed XML than > > > Jasper does reporting errors when parsing tag lib > > elements. > > > > > > Implementation: > > > > > > Detect if one or more taglib directives are in > > jsp. > > > > > > Load and validate tld's for taglibs, create a DTD > > for > > > each tag lib. DTD's for taglibs should be cached > > by Jasper > > > for later reuse. Perhaps XSLT could be used to > > transform > > > the tld into a dtd? > > > > > > Strip any HTML and/or scriptlets from the JSP that > > are not > > > inside an XML element, do not remove any lines so > > that any > > > errors report the correct line numbers. A regexp > > can probably > > > handle this. > > > > > > Add the correct XML document headers to the > > stripped JSP. > > > Each taglib being used in the JSP will have its > > own namespace. > > > > > > Pass the document to a DOM parser and report back > > any errors. > > > > > > Continue on with normal processing of JSP. > > > > > > In the future the parsed document may come in > > handy for > > > generating the servlet code. But for now I am > > only interested > > > in bettor error reporting. > > > > > > Comments? > > > > > > Regards, > > ===== > # Nick Bauman > # Technical Programmer > # http://webhelp.com > # real software, real code, real time > > __________________________________________________ > Do You Yahoo!? > Get Yahoo! Mail - Free email you can access from anywhere! > http://mail.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org -- ---------------------------------------------------------------------- Glenn Nielsen glenn@more.net | /* Spelin donut madder | MOREnet System Programming | * if iz ina coment. | Missouri Research and Education Network | */ | ----------------------------------------------------------------------