[jdom-interest] XML and XSL

Peter Barraud peterb at interrait.com
Mon Aug 20 04:05:40 PDT 2001


OK this sounds outlandish, is it possible for you to tell me where I can get
some sample/docs on this StreamSource/XSLT processor etc. is google a good
place to search for this stuff
but anyway, thanx a lot everybody for the response, a really great help and
at least it's got me started
pb

-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Laurent Bihanic
Sent: 20 August, 2001 3:56 PM
To: Jdom
Subject: Re: [jdom-interest] XML and XSL



Ian Lea wrote:

> Take a look at jdom-b7/samples/XSLTransform.java.  Send the result
> out to the browser from a servlet using something along the lines of
>
>   out.output(doc2, res.getWriter());


That won't work if the output is HTML as you can not build a JDOM document
from HTML content (because it's not well-formed XML).

XSLTransform.java is a good way to start for how to allocate a XSLT
processor.
But if you want just plain XML to HTML conversion, skip JDOM and the
JDOMSource/Result and use a plain StreamSource for feeding the XML to the
XSLT
processor and a StreamResult to get the HTML as text directly on the servlet
response stream.

Laurent

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com




More information about the jdom-interest mailing list