tmiller     01/10/22 03:53:56

  Modified:    java/src/org/apache/xalan/xsltc/trax
                        TransformerFactoryImpl.java
  Log:
  added a empty string systemId in cases where it was
  set to null, slight rearrangment of StreamSource handling code as well.
  
  Revision  Changes    Path
  1.26      +8 -10     
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- TransformerFactoryImpl.java       2001/10/15 17:14:23     1.25
  +++ TransformerFactoryImpl.java       2001/10/22 10:53:56     1.26
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TransformerFactoryImpl.java,v 1.25 2001/10/15 17:14:23 tmiller 
Exp $
  + * @(#)$Id: TransformerFactoryImpl.java,v 1.26 2001/10/22 10:53:56 tmiller 
Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -397,6 +397,9 @@
   
        InputSource input = null;
        String systemId = source.getSystemId();
  +     if (systemId == null) {
  +         systemId = "";
  +     }
   
        try {
   
  @@ -426,19 +429,14 @@
                    input = new InputSource(istream);
                else if (reader != null)
                    input = new InputSource(reader);
  +             else if ((new File(systemId)).exists()) {
  +                 input = new InputSource(
  +                     new File(systemId).toURL().toExternalForm());
  +             }
            }
            else {
                throw new TransformerConfigurationException(UNKNOWN_SOURCE_ERR);
            }
  -
  -         if ((new File(systemId)).exists()) {
  -             systemId = new File(systemId).toURL().toExternalForm(); 
  -         }
  -
  -         // Try to create an InputStream from the SystemId if no input so far
  -         if (input == null) input = new InputSource(systemId);
  -
  -         // Pass system id to InputSource just to be on the safe side
            input.setSystemId(systemId);
        }
        catch (NullPointerException e) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to