You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Cheryl Stewart <ch...@cp.net> on 2000/05/01 20:08:21 UTC

HELP, xalan and servlets

I am trying to run xalan on input XML and XSL files.  It works fine when I run it at the command line.  When I try to call it from my program (snippet below) - I get the following error:

  WebManagerServlet:init
  webservices.xml; Line -1; Column -1
  XSL Error: Could not parse webservices.xml document!
  XSL Error: SAX Exception

How do I specify the path for xalan to look for my XML and XSL files.  I tried moving them to the servets directory, but that did not work either.

Any help would be appreciated,

 Cheryl

********************************************************************************************************
...
       // Have the XSLTProcessorFactory obtain an interface to a
       // new XSLTProcessor object.
       XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

       // Have the XSLTProcessor processor object transform "webservices.xml"
       // to HTML (returned to the client) using the XSLT instructions
       // found in "webservices.xsl"
       out.print("Calling processor\n");
       out.print("xmlFile is \n" + xmlFile);
       processor.process(new XSLTInputSource(xmlFile),
                         new XSLTInputSource(xslFile),
                         new XSLTResultTarget(out));

       out.print("Returned from processor\n");
       } catch (SAXException e) {}               
~~~Cheryl Stewart, Software Engineer
~~~Critical Path
~~~Phone: (310)752-3288
~~~Email: cheryl.stewart@cp.net