This is with regards to one of the earlier postings in this list
When I run Jakarta Tomcat and use the Saxon parser, I get this message
"FATAL: configuration error javax.xml.parsers.ParserConfigurationException:AElfred parser is namespace-aware". (ERROR 1)

This happens if Tomcat library is listed after the Saxon library in the project properties. This does not allow the tomcat to even start up.

If I switch positions I am able to get Tomcat to start up but then I get the following message when I execute it.
"java.lang.NoSuchMethodError    at com.icl.saxon.TransformerFactoryImpl.getStyleParser(TransformerFactoryImpl.java:521)". (ERROR 2)

One of the solutions Michael Kay had mentioned in a response to the posting was that the system property needs to be set with the parser that is being used. I have it in the code but Error 2 happened. I was wondering if you can suggest something I could do to fix the problem.

The following code is what I used for the xml parsing.

Any help in solving this problem is highly appreciated.


private void writeOut()
  {
    File xmlFile = new File("file:///C|/TestFolder/test.xml");
    File xsltFile= new File("file:///C|/TestFolder/xsl/OK.xsl");

    //javax.xml.parsers.SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance();
    //spf.setNamespaceAware(true);
    javax.xml.transform.Source xmlSource =
      new javax.xml.transform.stream.StreamSource(xmlFile);
    javax.xml.transform.Source xsltSource =
      new javax.xml.transform.stream.StreamSource(xsltFile);
    javax.xml.transform.Result result =
      new javax.xml.transform.stream.StreamResult (System.out);

    javax.xml.transform.TransformerFactory transFact =
      javax.xml.transform.TransformerFactory.newInstance();
    try
    {
      System.setProperty("javax.xml.parsers.SAXParserFactory","com.icl.saxon.aelfred.SAXParserFactoryImpl");
      System.out.println(System.getProperty("javax.xml.parsers.SAXParserFactory"));
      javax.xml.transform.Transformer trans =
        transFact.newTransformer(xsltSource);

      trans.transform(xmlSource, result);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }