protected InputSource getDocument(HttpServletRequest request, ApplyXSLTListener listener)
protected StreamSource getDocument(HttpServletRequest request, ApplyXSLTListener listener)
  protected InputSource getDocument(HttpServletRequest request,                                    ApplyXSLTListener listener)    throws ApplyXSLTException  {    try    {      String xmlURL = null;      // document from PathInfo      if ((xmlURL = request.getPathInfo()) != null)      {        listener.out.println("Parsing XML Document from PathInfo: " + xmlURL);        return new InputSource(new URL("http", ((DefaultApplyXSLTProperties)                                             ourDefaultParameters).getLocalHost(),                                             xmlURL.replace('\\', '/')).openStream());		      }      // document from Request parameter      if ((xmlURL = ourDefaultParameters.getXMLurl(request)) != null)      {        listener.out.println("Parsing XML Document from request parameter: " + xmlURL);        return new InputSource(new URL(xmlURL).openStream());      }      // document from chain      String contentType = request.getContentType();      if ((contentType != null) && contentType.startsWith("text/xml"))      {        listener.out.println("Parsing XML Document from request chain");        return new InputSource(request.getInputStream());      }    }    catch (IOException ioe)    {      throw new ApplyXSLTException(ioe, HttpServletResponse.SC_NOT_FOUND);    }    catch (Exception e)    {      throw new ApplyXSLTException(e, HttpServletResponse.SC_INTERNAL_SERVER_ERROR);    }    return null;  }