You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/01/29 16:37:53 UTC

cvs commit: xml-xalan/test/java/src/org/apache/qetest/trax TestMultiTypeThreads.java

sboag       01/01/29 07:37:53

  Modified:    test/java/src/org/apache/qetest/trax
                        TestMultiTypeThreads.java
  Log:
  Set the system ID of the handler before a parse in the SAX test.
  
  Revision  Changes    Path
  1.4       +9 -8      xml-xalan/test/java/src/org/apache/qetest/trax/TestMultiTypeThreads.java
  
  Index: TestMultiTypeThreads.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/TestMultiTypeThreads.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestMultiTypeThreads.java	2000/12/18 19:57:09	1.3
  +++ TestMultiTypeThreads.java	2001/01/29 15:37:51	1.4
  @@ -614,9 +614,9 @@
       {
           File f = new File(filename);
           String tmp = f.getAbsolutePath();
  -	    if (File.separatorChar == '\\') {
  -	        tmp = tmp.replace('\\', '/');
  -	    }
  +            if (File.separatorChar == '\\') {
  +                tmp = tmp.replace('\\', '/');
  +            }
           return "file:///" + tmp;
       }
   }  // end of class TestMultiTypeThreads
  @@ -982,10 +982,10 @@
           XMLReader reader = null;
   
           // Use JAXP1.1 ( if possible )
  -	    javax.xml.parsers.SAXParserFactory spfactory = javax.xml.parsers.SAXParserFactory.newInstance();
  -	    spfactory.setNamespaceAware(true);
  -	    javax.xml.parsers.SAXParser jaxpParser = spfactory.newSAXParser();
  -	    reader = jaxpParser.getXMLReader();
  +            javax.xml.parsers.SAXParserFactory spfactory = javax.xml.parsers.SAXParserFactory.newInstance();
  +            spfactory.setNamespaceAware(true);
  +            javax.xml.parsers.SAXParser jaxpParser = spfactory.newSAXParser();
  +            reader = jaxpParser.getXMLReader();
   
           if (reader == null) 
               reader = XMLReaderFactory.createXMLReader();
  @@ -995,10 +995,11 @@
           // Send the SAX events from the parser to the transformer,
           // and thus to the DOM tree.
           print(marker);  // Note presence of this in logs shows which process threw an exception
  +        handler.setSystemId(xmlName);
           reader.parse(xmlName);
   
           // Serialize the DOM tree out
  -	    FileOutputStream fos = new FileOutputStream(outName);
  +            FileOutputStream fos = new FileOutputStream(outName);
           Transformer serializer = factory.newTransformer();
           //serializer.setOutputProperty(OutputKeys.INDENT, "yes");
           //serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");