This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: creating XML in a servlet
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Najmi, Jamal" <Jamal dot Najmi at Artesia dot com>
- Cc: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 8 Apr 2002 10:03:47 +0100
- Subject: Re: [xsl] creating XML in a servlet
- Organization: Jeni Tennison Consulting Ltd
- References: <0F966D8A9FE8D411A3450002B31A16D105B49D20@rckmail03.artesiatech.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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