You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by il...@apache.org on 2003/04/05 03:05:13 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java

ilene       2003/04/04 17:05:12

  Modified:    java/src/org/apache/xalan/processor
                        TransformerFactoryImpl.java
  Log:
  Instead of setting a default baseURI in newTemplates, append a dummy string
  to the default used in the TreeWalker constructors.  This solves the problem
  of violating the SourceLocator.getSystemId API which should return null
  if if no systemId was set, while allowing relative URI's to be resolved when
  the source is a DOM and no systemID has been set.  Relative URI's are already 
  resolved correctly for other source types.
  
  Revision  Changes    Path
  1.51      +3 -23     xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/TransformerFactoryImpl.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- TransformerFactoryImpl.java	1 Apr 2003 19:52:56 -0000	1.50
  +++ TransformerFactoryImpl.java	5 Apr 2003 01:05:12 -0000	1.51
  @@ -852,30 +852,10 @@
   
       String baseID = source.getSystemId();
   
  -    if (null == baseID)
  -    {
  -      try
  -      {
  -        String currentDir = System.getProperty("user.dir");
  -        
  -        if (currentDir.startsWith(java.io.File.separator))
  -          baseID = "file://" + currentDir + java.io.File.separatorChar
  -                   + source.getClass().getName();
  -        else
  -          baseID = "file:///" + currentDir + java.io.File.separatorChar
  -                   + source.getClass().getName();
  -      }
  -      catch (SecurityException se)
  -      {
  -
  -        // For untrusted applet case, user.dir is outside the sandbox 
  -        //  and not accessible: just leave baseID as null (-sb & -sc)
  -      }
  -    }
  -    else
  -    {
  -      baseID = SystemIDResolver.getAbsoluteURI(baseID);
  +    if (null != baseID) {
  +       baseID = SystemIDResolver.getAbsoluteURI(baseID);
       }
  +
   
       if (source instanceof DOMSource)
       {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org