Sorry, pl re-read the first line of my previous email like this:
How about this? I have created XSL file from the url itself, though on

-----Original Message-----
From: Jasmin Mehta 
Sent: Friday, March 21, 2003 2:21 PM
To: [EMAIL PROTECTED]
Subject: RE: url to xml/xsl file in servlet

How about this? I have created XML file from the url itself, though on
the same server. But I guess should work from other server too.

URL fileOpenservlet = new
URL("http://localhost/MyApplication/stylesheet/example.xsl";);

HttpURLConnection  servletConnection = (HttpURLConnection)
fileOpenservlet.openConnection();
       InputStream xslInStream = servletConnection.getInputStream();

And you can use this xslInStream in 

          Transformer transformer=TransformerFactory.newInstance()
                  .newTransformer(new StreamSource(xslInStream));
          transformer.transform(new JDOMSource(xmlsource), new
SAXResult(driver.getContentHandler()));

I have not done the similar thing with XML input(source). May be you can
do trial and err.

I found in JDOM API, the method 

public void setInputSource(InputSource inputSource)
                    throws UnsupportedOperationExceptionSets the SAX
InputSource to be used for the Source.

May be this can help.

Jasmin


-----Original Message-----
From: Adam Shelley [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 21, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: RE: url to xml/xsl file in servlet

Hello,

can anyone verify if this will work:

changing the servlet from

XSLTInputHandler(new URL(xmlParam), new URL(xslParam));

instead of

XSLTInputHandler(new FILE(xmlParam), new FILE(xslParam));

I don't know anything about java but in my searches i have found this
type
of 'input stream' (?) used.  I just have a big problem where I have a
web
page that calls the servlet (that resides on another server) and it
needs to
be able to pass the XML data into the servlet.  In the faq they have an
example of using a 'transformerfactory' to input the actual XML string
into
the servlet but this would require that all xml data be smaller the the
http
POST/GET limitations.  I was hoping to be able to modify the servlet in
such
a way that it will load the data from a temp url located on another
server.

If anyone has done such a modification and wants to pass on how they did
it,
howto to do it, that would be super appreciated.

-Adam

-----Original Message-----
From: Adam Shelley [mailto:[EMAIL PROTECTED]
Sent: March 21, 2003 10:35 AM
To: [EMAIL PROTECTED]
Subject: RE: url to xml/xsl file in servlet


Hello,

Thank you for the reply.  Unfortunately I want to modify the servlet in
such
a way so that it can load the xml file from another server via http.  I
am
not sure if this will require modification to the underlying xslt
tranformation libraries or what.  Unfortuneately i'm not a java
programmer
so i'm not sure where to start.  I can see  this being a requirement of
other people who use this in a servlet so i was hoping that someone has
already done such a modification and could share it.  I haven't been
able to
find this tho on this list or the dev list.  right now i'm crossing my
eyes
at java docs seeing if i can figure anything out but i'm sure someone
else
has done this and it was relatively easy.

-Adam



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to