Hi,

I'm trying to run the following code in a Java servlet:

        try {
            InputStream bais = new ByteArrayInputStream(in_XML.getBytes());
            OutputStream baos = new ByteArrayOutputStream();
            
            TransformerFactory tFactory = TransformerFactory.newInstance();

            // Use the TransformerFactory to instantiate a Transformer that
will work with the stylesheet you specify. 
            // This method call also processes the stylesheet into a
compiled Templates object.
        **          Transformer transformer = tFactory.newTransformer(new
StreamSource("http://mydomain.com/xml/stylesheet/stylesheetname.html.xsl";));

            // Use the Transformer to apply the associated Templates object
to an XML document
            transformer.transform(new StreamSource(bais), new
StreamResult(baos));
        }
                catch(Exception e) {
                Debug.println("Exception XSLT Transformation! " +
e.toString(),1,DebugLogFilenames.XML_LOG);
 
        }

The line denoted with ** is where it hangs.  It does not throw any
exceptions.  This code is being run on a Sun Solaris machine.  The same code
when run on NT webserver runs fine as long as the Stream Source is changed
to a file location such as "C:\xml\stylesheet\stylesheetname.html.xsl".  I
have put "http://mydomain.com/xml/stylesheet/stylesheetname.html.xsl"; in my
browser and it displays the style sheet fine so I think that it is resolving
the URL alright.  I would think that an exception would be thrown and caught
if this was a problem but nothing ever makes it to the exception log.  Any
ideas?


Reply via email to