cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xslt XSLTProcessor.java
Date Fri, 14 Apr 2000 17:15:46 GMT
stefano     00/04/14 10:15:45

  Modified:    src/org/apache/cocoon/processor/xslt XSLTProcessor.java
  Log:
  fixes possible encoding problem with stylesheet loading
  
  Revision  Changes    Path
  1.11      +3 -14     xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XSLTProcessor.java	2000/04/08 00:54:58	1.10
  +++ XSLTProcessor.java	2000/04/14 17:15:45	1.11
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSLTProcessor.java,v 1.10 2000/04/08 00:54:58 stefano Exp $ --
  +/*-- $Id: XSLTProcessor.java,v 1.11 2000/04/14 17:15:45 stefano Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -70,7 +70,7 @@
    * This class implements an XSLT processor.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.10 $ $Date: 2000/04/08 00:54:58 $
  + * @version $Revision: 1.11 $ $Date: 2000/04/14 17:15:45 $
    */
   
   public class XSLTProcessor implements Actor, Processor, Status, Defaults {
  @@ -185,18 +185,7 @@
       private Document getDocument(Object resource) throws Exception {
           InputSource input = new InputSource();
           input.setSystemId(resource.toString());
  -
  -        if (resource instanceof File) {
  -            input.setCharacterStream(new FileReader(((File) resource)));
  -        } else if (resource instanceof URL) {
  -            input.setCharacterStream(new InputStreamReader(((URL) resource).openStream()));
  -        } else {
  -            // should never happen
  -            throw new Error("Fatal error: Could not elaborate given resource: " + resource);
  -        }
  -
  -        // do not validate stylesheets
  -        return this.parser.parse(input, false);
  +        return this.parser.parse(input, false);  // do not validate stylesheets
       }
   
       public boolean hasChanged(Object context) {
  
  
  

Mime
View raw message