cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/transformation SimpleFormTransformer.java
Date Sat, 06 Dec 2003 20:00:11 GMT
haul        2003/12/06 12:00:11

  Modified:    src/java/org/apache/cocoon/transformation
                        SimpleFormTransformer.java
  Log:
  fix missing counting up for nested startElement events when skipping
  
  Revision  Changes    Path
  1.10      +15 -10    cocoon-2.1/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java
  
  Index: SimpleFormTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SimpleFormTransformer.java	15 Nov 2003 04:21:30 -0000	1.9
  +++ SimpleFormTransformer.java	6 Dec 2003 20:00:10 -0000	1.10
  @@ -1171,7 +1171,7 @@
        * so that only the children are skipped.
        * 
        * @param skip
  -     * @param children 
  +     * @param skipChildrenOnly 
        * @param uri
        * @param name
        * @param raw
  @@ -1180,26 +1180,31 @@
        */
       protected void relayStartElement(
           boolean skip,
  -        boolean children,
  +        boolean skipChildrenOnly,
           String uri,
           String name,
           String raw,
           Attributes attr)
           throws SAXException {
   
  -        if (skip)
  -            this.skipChildrenOnly = children;
  -        if (skip && !children)
  -            this.ignoreEventsCount++;
           try {
  -            super.startTransformingElement(uri, name, raw, attr);
  +            if (this.ignoreEventsCount > 0) {
  +                this.ignoreEventsCount++;
  +                super.startTransformingElement(uri, name, raw, attr);
  +            } else {
  +                if (skip)
  +                    this.skipChildrenOnly = skipChildrenOnly;
  +                if (skip && !skipChildrenOnly)
  +                    this.ignoreEventsCount++;
  +                super.startTransformingElement(uri, name, raw, attr);
  +                if (skip && skipChildrenOnly)
  +                    this.ignoreEventsCount++;
  +            }
           } catch (ProcessingException e) {
               throw new SAXException(e);
           } catch (IOException e) {
               throw new SAXException(e);
           }
  -        if (skip && children)
  -            this.ignoreEventsCount++;
       }
   
       /**
  
  
  

Mime
View raw message