cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xslt XSLTProcessorImpl.java
Date Wed, 05 Sep 2001 07:00:10 GMT
cziegeler    01/09/05 00:00:10

  Modified:    src/org/apache/cocoon/components/xslt XSLTProcessorImpl.java
  Log:
  cocoon: can now be used as input for stylesheets
  
  Revision  Changes    Path
  1.4       +9 -4      xml-cocoon2/src/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSLTProcessorImpl.java	2001/08/25 19:40:32	1.3
  +++ XSLTProcessorImpl.java	2001/09/05 07:00:10	1.4
  @@ -19,6 +19,7 @@
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.store.Store;
  +import org.apache.cocoon.environment.ModifiableSource;
   import org.apache.cocoon.environment.Source;
   import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.util.TraxErrorHandler;
  @@ -121,7 +122,7 @@
           getLogger().debug("Creating new Templates in " + this + " for " + is);
           if (is.getSystemId() != null)
             getLogger().debug("  with system id " + is.getSystemId());
  -        
  +
           //templates = getTransformerFactory().newTemplates(new SAXSource(is));
   
           // Create a Templates ContentHandler to handle parsing of the
  @@ -236,13 +237,14 @@
       throws IOException, ProcessingException
     {
       Templates templates = null;
  -    InputSource is = stylesheet.getInputSource();
  -    getLogger().debug("XSLTProcessorImpl getTemplates: stylesheet "
  -                      + is.getSystemId());
   
       if (useStore == false)
         return null;
   
  +    InputSource is = stylesheet.getInputSource();
  +    getLogger().debug("XSLTProcessorImpl getTemplates: stylesheet "
  +                      + is.getSystemId());
  +
       // only stylesheets with a last modification date are stored
       if (stylesheet.getLastModified() != 0) {
   
  @@ -268,6 +270,9 @@
         if (store.containsKey(is.getSystemId())) {
           store.remove(is.getSystemId());
         }
  +    }
  +    if (stylesheet instanceof ModifiableSource) {
  +        ((ModifiableSource)stylesheet).refresh();
       }
       return templates;
     }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message