You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "John O'Shea (Groups a/c)" <jo...@xlml.com> on 2001/09/27 18:23:47 UTC

Getting at XML output from Jasper...

Hi all,
  I'm looking at the source for Jasper as I'm trying get something which 
can generate XML style JSP documents from JSP pages - I'm not interested 
in the subsequent Servlet source generation &  bytecode compilation (the 
XML document is required for building a visual model of the JSP & it'd 
dependencies on Taglibs, JavaBeans etc) so it's the initial part of 
Jaspers parse/generate/compile cycle that interests me.  
    Looking at the source and development docs I see there are several 
comments indicating that the intention is to expose the XML document 
either during parsing or as one of the end results of running Jasper 
over a JSP page.
    Being a newbie on the list, I'm wondering if anyone is currently 
working on this or has thoughts about how it would best be exposed.  I'm 
just beginning to look at the code (specifically 
JspParseEventListener.java) but I need to build a better idea of all the 
other stuff Jasper is doing as part of the parsing process before I'll 
start hacking anything...

    Pointers very welcome!

John.


Re: Getting at XML output from Jasper...

Posted by Eduardo Pelegri-Llopart <pe...@sun.com>.
You can get at the XML view of a JSP page from any TagLibraryValidator
in the page.  That is somewhat indirect but it is portable to all JSP
1.2 containers.

Note that the XML view of a JSP page is not necessarily the 'best' XML
syntax you can use for that page.  In particular, the XML view will
treat template data as a 'chunk' that is tagged as <jsp:text>, while if
you are dealing with XML template data you may be able to just include
the XML fragment verbatim.

Hope this helps,

	- eduard/o

"John O'Shea (Groups a/c)" wrote:
> 
> Hi all,
>   I'm looking at the source for Jasper as I'm trying get something which
> can generate XML style JSP documents from JSP pages - I'm not interested
> in the subsequent Servlet source generation &  bytecode compilation (the
> XML document is required for building a visual model of the JSP & it'd
> dependencies on Taglibs, JavaBeans etc) so it's the initial part of
> Jaspers parse/generate/compile cycle that interests me.
>     Looking at the source and development docs I see there are several
> comments indicating that the intention is to expose the XML document
> either during parsing or as one of the end results of running Jasper
> over a JSP page.
>     Being a newbie on the list, I'm wondering if anyone is currently
> working on this or has thoughts about how it would best be exposed.  I'm
> just beginning to look at the code (specifically
> JspParseEventListener.java) but I need to build a better idea of all the
> other stuff Jasper is doing as part of the parsing process before I'll
> start hacking anything...
> 
>     Pointers very welcome!
> 
> John.