cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/transformation TraxTransformer.java
Date Sun, 21 Jul 2002 23:09:52 GMT
vgritsenko    2002/07/21 16:09:52

  Modified:    src/java/org/apache/cocoon/transformation
                        TraxTransformer.java
  Log:
  Backport fix from branch to correctly handle xsl includes
  
  Revision  Changes    Path
  1.31      +16 -6     xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- TraxTransformer.java	19 Jul 2002 13:09:31 -0000	1.30
  +++ TraxTransformer.java	21 Jul 2002 23:09:52 -0000	1.31
  @@ -82,8 +82,11 @@
   import javax.xml.transform.sax.SAXResult;
   import javax.xml.transform.sax.TransformerHandler;
   import java.io.IOException;
  -import java.text.StringCharacterIterator;
  -import java.util.*;
  +import java.util.Map;
  +import java.util.Iterator;
  +import java.util.Set;
  +import java.util.HashMap;
  +import java.util.Enumeration;
   
   /**
    * This Transformer is used to transform this incomming SAX stream using
  @@ -194,6 +197,9 @@
       /** The trax TransformerHandler */
       TransformerHandler transformerHandler;
   
  +    /** The validity of the Transformer */
  +    SourceValidity transformerValidity;
  +
       /** The Source */
       private Source inputSource;
       /** The parameters */
  @@ -322,7 +328,10 @@
   
           /** Get a Transformer Handler */
           try {
  -            this.transformerHandler = this.xsltProcessor.getTransformerHandler(inputSource,
null);
  +            XSLTProcessor.TransformerHandlerAndValidity handlerAndValidity =
  +                    this.xsltProcessor.getTransformerHandlerAndValidity(inputSource, null);
  +            this.transformerHandler = handlerAndValidity.getTransfomerHandler();
  +            this.transformerValidity = handlerAndValidity.getTransfomerValidity();
           } catch (XSLTProcessorException se) {
               throw new ProcessingException("Unable to get transformer handler for " + src,
se);
           }
  @@ -364,9 +373,9 @@
           * VG: Key is generated using parameter/value pairs,
           * so this information does not need to be verified again
           * (if parameter added/removed or value changed, key should
  -        * change also), only stylesheet's modified time is included.
  +        * change also), only stylesheet's validity is included.
           */
  -        return this.inputSource.getValidity();
  +        return this.transformerValidity;
       }
   
       /**
  @@ -572,6 +581,7 @@
   
       public void recycle() {
           this.transformerHandler = null;
  +        this.transformerValidity = null;
           this.objectModel = null;
           if (this.inputSource != null) {
               this.resolver.release(this.inputSource);
  
  
  

----------------------------------------------------------------------
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