Maybe an even easier mechanism is just to leave the JSP sources as *.txt
files?
James
----- Original Message -----
From: "James Strachan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 7:55 PM
Subject: Re: [UPDATE] Converting existing taglibs to use new build
> Hi Glenn
>
> > What we really need to do is turn the JSP into a well formed XML
document.
> > This would require that any HTML in the JSP be XHTML.
>
> Not quite - we just want the JSP source code to be viewable in a web
> browser - so we need to encode
>
> <html>
> </html>
>
> as
>
> <html>
> </html>
>
> So that in a web browser it looks like the source code...
>
> <html>
> </html>
>
>
> I'd prefer if we can keep all JSP in whatever textual format.
>
>
> > I would prefer if we created some generic ant tasks that we can
contribute
> > back to the Ant Project.
>
> Though pretty-printing JSP source code as HTML would be nice too ;-)
>
>
> > The replace ant task is too restrictive. We could
> > add a nested <header file=""/> and <footer file=""> to the replace task.
>
> That would do all we need to get going. We can do the escaping of &, <, >
> already, we just need to add a fixed
>
> <document>
> .. the text...
> </document>
>
> header & footer so its XML.
>
>
> > Then perhaps clone the replace task and create a regexp task. The
regexp
> > task could be used to run multiple substitution regular expressions on
the
> > source file. The regular expressions could be used to transform the JSP
> > page into a valid XML document by using regexp to escape rtexprvalues,
> > and replace <%@ with jsp:directive. <%! with jsp:declaration <%= with
> > jsp:expression <%-- with jsp:comment, etc.
>
> I'd like this - maybe that could be version 2?
>
> We could then use the regexp task to turn (say) <io:request> into <font
> color="blue"><io:request></font>
>
> then we could color-code the use of custom tags in the source code, so
users
> can easily see what is the custom tags parts and whats regular HTML stuff.
>
> James
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com