jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags AbstractXPathTag.java ForEachTag.java TagHelper.java
Date Mon, 21 May 2001 16:18:11 GMT
jstrachan    01/05/21 09:18:09

  Modified:    xtags/src/org/apache/taglibs/xtags/tags
                        AbstractXPathTag.java ForEachTag.java
                        TagHelper.java
  Log:
  Made XML declaration not appear by default in the <xtags:copyOf> tag
  
  Revision  Changes    Path
  1.5       +1 -1      jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/AbstractXPathTag.java
  
  Index: AbstractXPathTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/AbstractXPathTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractXPathTag.java	2001/05/09 16:07:08	1.4
  +++ AbstractXPathTag.java	2001/05/21 16:17:53	1.5
  @@ -168,7 +168,7 @@
       
       public Object getInputNodes( boolean warn ) {
           if ( context == null ) {
  -            context = TagHelper.getInputNodes( pageContext, this, warn );
  +            return TagHelper.getInputNodes( pageContext, this, warn );
           }
           return context;
       }
  
  
  
  1.5       +9 -4      jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ForEachTag.java	2001/05/09 16:07:11	1.4
  +++ ForEachTag.java	2001/05/21 16:17:55	1.5
  @@ -139,6 +139,7 @@
                   return EVAL_BODY_TAG;
               }
           }
  +        reset();
           return SKIP_BODY;
       }
   
  @@ -151,20 +152,19 @@
                   finishLoop();
               }
           }
  +        reset();
           return SKIP_BODY;
       }
       
   
       public void release() {
  +        reset();
           xpath = null;
           sortXPath = null;
  -        iterator = null;
  -        contextNode = null;
           distinct = false;
       }
   
       
  -    
       // Properties
       //-------------------------------------------------------------------------       
            
       public void setContext(Object context) {
  @@ -260,7 +260,7 @@
         */
       public Object getInputNodes() {
           if ( context == null ) {
  -            context = TagHelper.getInputNodes( pageContext, this, true );
  +            return TagHelper.getInputNodes( pageContext, this, true );
           }
           return context;
       }
  @@ -307,6 +307,11 @@
       /** @return the factory used to create XPath instances */
       protected DocumentFactory getDocumentFactory() {
           return DocumentFactory.getInstance();
  +    }
  +    
  +    private void reset() {
  +        iterator = null;
  +        contextNode = null;
       }
       
   }
  
  
  
  1.4       +7 -1      jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/TagHelper.java
  
  Index: TagHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/TagHelper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TagHelper.java	2001/05/09 16:07:19	1.3
  +++ TagHelper.java	2001/05/21 16:17:57	1.4
  @@ -90,7 +90,7 @@
         * JSP files */
       public static final String REQUEST_KEY_STYLESHEET = "org.apache.taglibs.xtags.taglib.Stylesheet";
   
  -    protected static OutputFormat outputFormat = new OutputFormat( "  ", true );
  +    protected static final OutputFormat outputFormat;
       
       /** Request scope attribute name used to pass the XMLWriter between
         * JSP files 
  @@ -100,6 +100,12 @@
       /** Logger */
       private static final Category log = Category.getInstance( TagHelper.class );
   
  +    static {
  +        outputFormat = new OutputFormat( "  ", true );
  +        outputFormat.setSuppressDeclaration(true);
  +    }
  +    
  +    
       public static OutputFormat getOutputFormat( PageContext pageContext ) {
           return outputFormat;
       }
  
  
  

Mime
View raw message