cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation EffectWidgetReplacingPipe.java
Date Mon, 15 Mar 2004 14:21:24 GMT
tim         2004/03/15 06:21:24

  Modified:    src/blocks/forms/java/org/apache/cocoon/forms/transformation
                        EffectWidgetReplacingPipe.java
  Log:
  Make the Cocoon Forms transformer preserve namespaces
  instead of dropping them. Submitted by Steve Krulewitz.
  
  Revision  Changes    Path
  1.5       +12 -4     cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation/EffectWidgetReplacingPipe.java
  
  Index: EffectWidgetReplacingPipe.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation/EffectWidgetReplacingPipe.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EffectWidgetReplacingPipe.java	11 Mar 2004 02:56:32 -0000	1.4
  +++ EffectWidgetReplacingPipe.java	15 Mar 2004 14:21:24 -0000	1.5
  @@ -237,9 +237,15 @@
               case EVENT_SET_DOCUMENT_LOCATOR:
                   return this;
               case EVENT_START_PREFIX_MAPPING:
  -                // We consume this namespace completely
  -                EffectWidgetReplacingPipe.this.namespacePrefix = input.prefix;
  -                return this;
  +                if(Constants.TEMPLATE_NS.equals(input.uri)) {
  +                    // We consume this namespace completely.
  +                    EffectWidgetReplacingPipe.this.namespacePrefix = input.prefix;
  +                    return this;
  +                } else {
  +                    // Pass through all others.
  +                    out.copy();
  +                    return this;
  +                }
               case EVENT_ELEMENT:
                   if (Constants.TEMPLATE_NS.equals(input.uri)) {
                       if (FORM_TEMPLATE_EL.equals(input.loc)) {
  @@ -249,6 +255,8 @@
                                   "\" not permitted outside \"form-template\"");
                       }
                   } else {
  +                    // Pass through all others.
  +                    out.copy();
                       return this;
                   }
               case EVENT_END_PREFIX_MAPPING:
  
  
  

Mime
View raw message