[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] creating XML in a servlet


Subject: Re: [xsl] creating XML in a servlet
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 8 Apr 2002 10:03:47 +0100

Hi Jamal,

> Thanks a lot for the much needed detailed response!! I will
> definitely look into Cocoon. If I may ask one more question - as I
> am new to XSL so this is a very basic question: in order for me to
> accomplish what I want to accomplish, servlet needs to be able to
> interact with the XSL and get the output of XSL back and build XML
> in memory. Is this possible? I mean is there API defined through
> which Java can interact with the XSL back and forth.

Yes. The API that you use depends on the processor that you use to a
certain extent, but in general the Java XSLT processors support
TrAX (Transformation API for XML), which you can learn about at
http://xml.apache.org/xalan-j/trax.html and more generally JAXP (Java
API for XML Processing), which includes TrAX (see
http://jcp.org/aboutJava/communityprocess/review/jsr063/index.html).

Which processor are you using? Both Xalan and Saxon come with sample
servlets that you could build on. See
http://xml.apache.org/xalan-j/samples.html#servlet and
http://saxon.sourceforge.net/saxon6.5.1/samples.html#servlet.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords