tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: [PROPOSAL] Jasper, Use XML parser to improve error reporting of JSP taglib problems
Date Tue, 25 Jul 2000 14:59:01 GMT
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
> <Eduardo.Pelegrillopart@eng.sun.com> 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  |  */                       |
----------------------------------------------------------------------

Mime
View raw message