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

&lt;html&gt;
&lt;/html&gt;

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">&lt;io:request&gt;</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

Reply via email to