You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2004/03/09 14:17:27 UTC

cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms Constants.java

cziegeler    2004/03/09 05:17:27

  Modified:    src/blocks/forms/java/org/apache/cocoon/forms/transformation
                        EffectPipe.java WidgetReplacingPipe.java
                        EffectWidgetReplacingPipe.java
               src/blocks/forms/java/org/apache/cocoon/forms/datatype
                        EmptySelectionList.java EnumSelectionList.java
                        StaticSelectionList.java
                        FlowJXPathSelectionList.java
               src/blocks/forms/java/org/apache/cocoon/forms/formmodel
                        Messages.java AbstractWidgetDefinition.java
                        Repeater.java MultiValueField.java Output.java
                        AbstractContainerWidget.java Upload.java Form.java
                        ContainerDelegate.java Field.java BooleanField.java
                        AggregateField.java
               src/blocks/forms/java/org/apache/cocoon/forms/util
                        I18nMessage.java
               src/blocks/forms/java/org/apache/cocoon/forms Constants.java
  Log:
  Remove empty attributes from constants; we already have this in XMLUtils
  
  Revision  Changes    Path
  1.2       +10 -10    cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation/EffectPipe.java
  
  Index: EffectPipe.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation/EffectPipe.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EffectPipe.java	9 Mar 2004 10:34:13 -0000	1.1
  +++ EffectPipe.java	9 Mar 2004 13:17:26 -0000	1.2
  @@ -17,10 +17,10 @@
   
   import java.util.LinkedList;
   
  -import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.xml.AbstractXMLPipe;
   import org.apache.cocoon.xml.SaxBuffer;
   import org.apache.cocoon.xml.XMLConsumer;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.Attributes;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.Locator;
  @@ -68,7 +68,7 @@
           public boolean mine;
   
           public Element() {
  -            prefix = null; uri = null; loc = null; raw = null; attrs = Constants.EMPTY_ATTRS; mine = true;
  +            prefix = null; uri = null; loc = null; raw = null; attrs = XMLUtils.EMPTY_ATTRIBUTES; mine = true;
           }
   
           public Element(String prefix, String uri) {
  @@ -80,9 +80,9 @@
               this.uri = uri;
               this.loc = loc;
               this.raw = raw;
  -            this.attrs = Constants.EMPTY_ATTRS;
  +            this.attrs = XMLUtils.EMPTY_ATTRIBUTES;
               if (attrs == null) {
  -                this.attrs = Constants.EMPTY_ATTRS;
  +                this.attrs = XMLUtils.EMPTY_ATTRIBUTES;
                   mine = true;
               } else {
                   this.attrs = attrs;
  @@ -93,7 +93,7 @@
           public void addAttributes(Attributes attrs) {
               if (attrs != null) {
                   if (mine == true) {
  -                    if (this.attrs == Constants.EMPTY_ATTRS) {
  +                    if (this.attrs == XMLUtils.EMPTY_ATTRIBUTES) {
                           this.attrs = attrs;
                           mine = false;
                       } else {
  @@ -108,7 +108,7 @@
           }
   
           public void addAttribute(String uri, String loc, String raw, String type, String value) {
  -            if (!mine || attrs == Constants.EMPTY_ATTRS) {
  +            if (!mine || attrs == XMLUtils.EMPTY_ATTRIBUTES) {
                   attrs = new AttributesImpl(attrs);
                   mine = true;
               }
  @@ -116,7 +116,7 @@
           }
   
           public void addAttribute(String prefix, String uri, String loc, String value) {
  -            if (!mine || attrs == Constants.EMPTY_ATTRS) {
  +            if (!mine || attrs == XMLUtils.EMPTY_ATTRIBUTES) {
                   attrs = new AttributesImpl(attrs);
                   mine = true;
               }
  @@ -124,7 +124,7 @@
           }
   
           public void addAttribute(String loc, String value) {
  -            if (!mine || attrs == Constants.EMPTY_ATTRS) {
  +            if (!mine || attrs == XMLUtils.EMPTY_ATTRIBUTES) {
                   attrs = new AttributesImpl(attrs);
                   mine = true;
               }
  @@ -224,7 +224,7 @@
   
           public void startElement() throws SAXException {
               if (element.attrs == null) {
  -                element.attrs = Constants.EMPTY_ATTRS;
  +                element.attrs = XMLUtils.EMPTY_ATTRIBUTES;
               }
               super.startElement(element.uri, element.loc, element.raw, element.attrs);
               elements.addFirst(element);
  
  
  
  1.3       +3 -2      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation/WidgetReplacingPipe.java
  
  Index: WidgetReplacingPipe.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/transformation/WidgetReplacingPipe.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WidgetReplacingPipe.java	9 Mar 2004 13:08:46 -0000	1.2
  +++ WidgetReplacingPipe.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -24,6 +24,7 @@
   import org.apache.cocoon.i18n.I18nUtils;
   import org.apache.cocoon.xml.AbstractXMLPipe;
   import org.apache.cocoon.xml.SaxBuffer;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.commons.jxpath.JXPathException;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
  @@ -442,7 +443,7 @@
                       saxBuffer.toSAX(contentHandler);
                   } else {
                       // Insert an enclosing <wi:styling>
  -                    contentHandler.startElement(Constants.INSTANCE_NS, STYLING_EL, Constants.INSTANCE_PREFIX_COLON + STYLING_EL, Constants.EMPTY_ATTRS);
  +                    contentHandler.startElement(Constants.INSTANCE_NS, STYLING_EL, Constants.INSTANCE_PREFIX_COLON + STYLING_EL, XMLUtils.EMPTY_ATTRIBUTES);
                       saxBuffer.toSAX(contentHandler);
                       contentHandler.endElement(Constants.INSTANCE_NS, STYLING_EL, Constants.INSTANCE_PREFIX_COLON + STYLING_EL);
                   } 
  
  
  
  1.3       +4 -3      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EffectWidgetReplacingPipe.java	9 Mar 2004 13:08:46 -0000	1.2
  +++ EffectWidgetReplacingPipe.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -27,6 +27,7 @@
   import org.apache.cocoon.i18n.I18nUtils;
   import org.apache.cocoon.xml.AbstractXMLPipe;
   import org.apache.cocoon.xml.SaxBuffer;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.commons.jxpath.JXPathException;
   
   import org.xml.sax.Attributes;
  @@ -690,7 +691,7 @@
                       saxBuffer.toSAX(getContentHandler());
                   } else {
                       // Insert an enclosing <wi:styling>
  -                    out.startElement(Constants.INSTANCE_NS, STYLING_EL, Constants.INSTANCE_PREFIX_COLON + STYLING_EL, Constants.EMPTY_ATTRS);
  +                    out.startElement(Constants.INSTANCE_NS, STYLING_EL, Constants.INSTANCE_PREFIX_COLON + STYLING_EL, XMLUtils.EMPTY_ATTRIBUTES);
                       saxBuffer.toSAX(getContentHandler());
                       out.endElement(Constants.INSTANCE_NS, STYLING_EL, Constants.INSTANCE_PREFIX_COLON + STYLING_EL);
                   }
  @@ -718,7 +719,7 @@
                   if (widget instanceof ValidationErrorAware) {
                       ValidationError error = ((ValidationErrorAware)widget).getValidationError();
                       if (error != null) {
  -                        out.startElement(Constants.INSTANCE_NS, VALIDATION_ERROR, Constants.INSTANCE_PREFIX_COLON + VALIDATION_ERROR, Constants.EMPTY_ATTRS);
  +                        out.startElement(Constants.INSTANCE_NS, VALIDATION_ERROR, Constants.INSTANCE_PREFIX_COLON + VALIDATION_ERROR, XMLUtils.EMPTY_ATTRIBUTES);
                           error.generateSaxFragment(stylingHandler);
                           out.endElement(Constants.INSTANCE_NS, VALIDATION_ERROR, Constants.INSTANCE_PREFIX_COLON + VALIDATION_ERROR);
                       }
  
  
  
  1.3       +5 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java
  
  Index: EmptySelectionList.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EmptySelectionList.java	9 Mar 2004 13:08:46 -0000	1.2
  +++ EmptySelectionList.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -20,6 +20,7 @@
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.transformation.I18nTransformer;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -49,7 +50,7 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
           // Start wi:selection list
  -        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
   
           // Start wi:item
           AttributesImpl itemAttrs = new AttributesImpl();
  @@ -57,13 +58,13 @@
           contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
   
           // Start wi:label
  -        contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
           if (this.text != null) {
   
               if (i18n) {
                   contentHandler.startPrefixMapping("i18n", I18nTransformer.I18N_NAMESPACE_URI);
           
  -                contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT, "i18n:" + I18nTransformer.I18N_TEXT_ELEMENT, Constants.EMPTY_ATTRS);
  +                contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT, "i18n:" + I18nTransformer.I18N_TEXT_ELEMENT, XMLUtils.EMPTY_ATTRIBUTES);
                   contentHandler.characters(this.text.toCharArray(), 0, this.text.length());
                   contentHandler.endElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT, "i18n:" + I18nTransformer.I18N_TEXT_ELEMENT);
       
  
  
  
  1.4       +5 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java
  
  Index: EnumSelectionList.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EnumSelectionList.java	9 Mar 2004 13:08:46 -0000	1.3
  +++ EnumSelectionList.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -21,6 +21,7 @@
   
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -86,7 +87,7 @@
           Locale locale)
           throws SAXException {
           try {
  -            contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
               Field fields[] = clazz.getDeclaredFields();
               // Create void element
               if (nullable) {
  @@ -104,9 +105,9 @@
                       AttributesImpl itemAttrs = new AttributesImpl();
                       itemAttrs.addCDATAAttribute("value", stringValue);
                       contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
  -                    contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS);
  +                    contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                       // TODO: make i18n element optional
  -                    contentHandler.startElement(I18N_NS, TEXT_EL, I18N_PREFIX_COLON + TEXT_EL, Constants.EMPTY_ATTRS);
  +                    contentHandler.startElement(I18N_NS, TEXT_EL, I18N_PREFIX_COLON + TEXT_EL, XMLUtils.EMPTY_ATTRIBUTES);
                       contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
                       contentHandler.endElement(I18N_NS, TEXT_EL, I18N_PREFIX_COLON + TEXT_EL);
                       contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
  
  
  
  1.3       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java
  
  Index: StaticSelectionList.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StaticSelectionList.java	9 Mar 2004 13:08:46 -0000	1.2
  +++ StaticSelectionList.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -21,6 +21,7 @@
   import org.apache.cocoon.forms.datatype.convertor.Convertor;
   import org.apache.cocoon.forms.datatype.convertor.DefaultFormatCache;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.excalibur.xml.sax.XMLizable;
   
   import java.util.List;
  @@ -52,7 +53,7 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
           Convertor.FormatCache formatCache = new DefaultFormatCache();
  -        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
           Iterator itemIt = items.iterator();
           while (itemIt.hasNext()) {
               SelectionListItem item = (SelectionListItem)itemIt.next();
  @@ -100,7 +101,7 @@
               }
               itemAttrs.addCDATAAttribute("value", stringValue);
               contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
  -            contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
               if (label != null) {
                   label.toSAX(contentHandler);
               } else {
  
  
  
  1.4       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
  
  Index: FlowJXPathSelectionList.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FlowJXPathSelectionList.java	9 Mar 2004 13:08:46 -0000	1.3
  +++ FlowJXPathSelectionList.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -23,6 +23,7 @@
   import org.apache.cocoon.components.flow.FlowHelper;
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.commons.jxpath.JXPathContext;
   import org.apache.commons.jxpath.Pointer;
   import org.apache.excalibur.xml.sax.XMLizable;
  @@ -98,7 +99,7 @@
           }
   
           // Start the selection-list
  -        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
   
           while(iter.hasNext()) {
               String stringValue = "";
  @@ -131,7 +132,7 @@
               itemAttrs.addCDATAAttribute("value", stringValue);
               contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
               if (label != null) {
  -                contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS);
  +                contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                   if (label instanceof XMLizable) {
                       ((XMLizable)label).toSAX(contentHandler);
                   } else {
  
  
  
  1.4       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Messages.java
  
  Index: Messages.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Messages.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Messages.java	9 Mar 2004 13:08:45 -0000	1.3
  +++ Messages.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -18,6 +18,7 @@
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.forms.FormContext;
   import org.apache.cocoon.forms.util.StringMessage;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.excalibur.xml.sax.XMLizable;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  @@ -78,14 +79,14 @@
       }
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
  -        contentHandler.startElement(Constants.INSTANCE_NS, MESSAGES_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGES_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, MESSAGES_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGES_EL, XMLUtils.EMPTY_ATTRIBUTES);
   
           definition.generateDisplayData(contentHandler);
   
           Iterator messagesIt = messages.iterator();
           while (messagesIt.hasNext()) {
               XMLizable message = (XMLizable)messagesIt.next();
  -            contentHandler.startElement(Constants.INSTANCE_NS, MESSAGE_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGE_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, MESSAGE_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGE_EL, XMLUtils.EMPTY_ATTRIBUTES);
               message.toSAX(contentHandler);
               contentHandler.endElement(Constants.INSTANCE_NS, MESSAGE_EL, Constants.INSTANCE_PREFIX_COLON + MESSAGE_EL);
           }
  
  
  
  1.3       +3 -2      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AbstractWidgetDefinition.java
  
  Index: AbstractWidgetDefinition.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AbstractWidgetDefinition.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractWidgetDefinition.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ AbstractWidgetDefinition.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -23,6 +23,7 @@
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.forms.FormContext;
   import org.apache.cocoon.forms.validation.WidgetValidator;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.excalibur.xml.sax.XMLizable;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  @@ -123,7 +124,7 @@
                   String name = (String)entry.getKey();
                   
                   // Enclose the data into a "wi:{name}" element
  -                contentHandler.startElement(Constants.INSTANCE_NS, name, Constants.INSTANCE_PREFIX_COLON + name, Constants.EMPTY_ATTRS);
  +                contentHandler.startElement(Constants.INSTANCE_NS, name, Constants.INSTANCE_PREFIX_COLON + name, XMLUtils.EMPTY_ATTRIBUTES);
   
                   ((XMLizable)entry.getValue()).toSAX(contentHandler);
   
  
  
  
  1.4       +5 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Repeater.java
  
  Index: Repeater.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Repeater.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Repeater.java	9 Mar 2004 13:08:45 -0000	1.3
  +++ Repeater.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -24,6 +24,7 @@
   import org.apache.cocoon.forms.FormContext;
   import org.apache.cocoon.forms.event.WidgetEvent;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -244,16 +245,16 @@
           contentHandler.startElement(Constants.INSTANCE_NS, REPEATER_EL, Constants.INSTANCE_PREFIX_COLON + REPEATER_EL, repeaterAttrs);
   
           // the repeater's label
  -        contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
           definition.generateLabel(contentHandler);
           contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
   
           // heading element -- currently contains the labels of each widget in the repeater
  -        contentHandler.startElement(Constants.INSTANCE_NS, HEADINGS_EL, Constants.INSTANCE_PREFIX_COLON + HEADINGS_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, HEADINGS_EL, Constants.INSTANCE_PREFIX_COLON + HEADINGS_EL, XMLUtils.EMPTY_ATTRIBUTES);
           Iterator widgetDefinitionIt = repeaterDefinition.getWidgetDefinitions().iterator();
           while (widgetDefinitionIt.hasNext()) {
               WidgetDefinition widgetDefinition = (WidgetDefinition)widgetDefinitionIt.next();
  -            contentHandler.startElement(Constants.INSTANCE_NS, HEADING_EL, Constants.INSTANCE_PREFIX_COLON + HEADING_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, HEADING_EL, Constants.INSTANCE_PREFIX_COLON + HEADING_EL, XMLUtils.EMPTY_ATTRIBUTES);
               widgetDefinition.generateLabel(contentHandler);
               contentHandler.endElement(Constants.INSTANCE_NS, HEADING_EL, Constants.INSTANCE_PREFIX_COLON + HEADING_EL);
           }
  
  
  
  1.4       +6 -5      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueField.java
  
  Index: MultiValueField.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/MultiValueField.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MultiValueField.java	9 Mar 2004 13:08:45 -0000	1.3
  +++ MultiValueField.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -24,6 +24,7 @@
   import org.apache.cocoon.forms.validation.ValidationError;
   import org.apache.cocoon.forms.validation.ValidationErrorAware;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -114,17 +115,17 @@
           attrs.addCDATAAttribute("id", getFullyQualifiedId());
           contentHandler.startElement(Constants.INSTANCE_NS, MULTIVALUEFIELD_EL, Constants.INSTANCE_PREFIX_COLON + MULTIVALUEFIELD_EL, attrs);
   
  -        contentHandler.startElement(Constants.INSTANCE_NS, VALUES_EL, Constants.INSTANCE_PREFIX_COLON + VALUES_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, VALUES_EL, Constants.INSTANCE_PREFIX_COLON + VALUES_EL, XMLUtils.EMPTY_ATTRIBUTES);
           if (values != null) {
               for (int i = 0; i < values.length; i++) {
  -                contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +                contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
                   String value = fieldDefinition.getDatatype().getPlainConvertor().convertToString(values[i], locale, null);
                   contentHandler.characters(value.toCharArray(), 0, value.length());
                   contentHandler.endElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL);
               }
           } else if (enteredValues != null) {
               for (int i = 0; i < enteredValues.length; i++) {
  -                contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +                contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
                   String value = fieldDefinition.getDatatype().getPlainConvertor().convertToString(enteredValues[i], locale, null);
                   contentHandler.characters(value.toCharArray(), 0, value.length());
                   contentHandler.endElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL);
  @@ -144,7 +145,7 @@
   
           // validation message element
           if (validationError != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, XMLUtils.EMPTY_ATTRIBUTES);
               validationError.generateSaxFragment(contentHandler);
               contentHandler.endElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL);
           }
  
  
  
  1.4       +3 -2      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Output.java
  
  Index: Output.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Output.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Output.java	9 Mar 2004 13:08:45 -0000	1.3
  +++ Output.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -19,6 +19,7 @@
   import org.apache.cocoon.forms.FormContext;
   import org.apache.cocoon.forms.datatype.Datatype;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -72,7 +73,7 @@
   
           // the value
           if (value != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
               String stringValue;
               stringValue = definition.getDatatype().convertToString(value, locale);
               contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
  
  
  
  1.3       +3 -2      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AbstractContainerWidget.java
  
  Index: AbstractContainerWidget.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AbstractContainerWidget.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractContainerWidget.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ AbstractContainerWidget.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -21,6 +21,7 @@
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.forms.FormContext;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -71,7 +72,7 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale, String element) throws SAXException {
           if (getId() == null || getId().equals("")) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, element, Constants.INSTANCE_PREFIX_COLON + element, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, element, Constants.INSTANCE_PREFIX_COLON + element, XMLUtils.EMPTY_ATTRIBUTES);
           } else {
               AttributesImpl attrs = new AttributesImpl();
               attrs.addCDATAAttribute("id", getFullyQualifiedId());
  
  
  
  1.3       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java
  
  Index: Upload.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Upload.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Upload.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ Upload.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -25,6 +25,7 @@
   import org.apache.cocoon.forms.validation.ValidationErrorAware;
   import org.apache.cocoon.servlet.multipart.Part;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -150,14 +151,14 @@
   
           if (this.part != null) {
               String name = (String)this.part.getHeaders().get("filename");
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
               contentHandler.characters(name.toCharArray(), 0, name.length());
               contentHandler.endElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL);
           }
   
           // validation message element: only present if the value is not valid
           if (validationError != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, XMLUtils.EMPTY_ATTRIBUTES);
               validationError.generateSaxFragment(contentHandler);
               contentHandler.endElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL);
           }
  
  
  
  1.3       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java
  
  Index: Form.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Form.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ Form.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -30,6 +30,7 @@
   import org.apache.cocoon.forms.event.WidgetEvent;
   import org.apache.cocoon.forms.event.WidgetEventMulticaster;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.commons.collections.list.CursorableLinkedList;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  @@ -305,10 +306,10 @@
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
           AttributesImpl formAttrs = new AttributesImpl();
           formAttrs.addCDATAAttribute("id", definition.getId());
  -        contentHandler.startElement(Constants.INSTANCE_NS, FORM_EL, Constants.INSTANCE_PREFIX_COLON + FORM_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, FORM_EL, Constants.INSTANCE_PREFIX_COLON + FORM_EL, XMLUtils.EMPTY_ATTRIBUTES);
           definition.generateLabel(contentHandler);
   
  -        contentHandler.startElement(Constants.INSTANCE_NS, CHILDREN_EL, Constants.INSTANCE_PREFIX_COLON + CHILDREN_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, CHILDREN_EL, Constants.INSTANCE_PREFIX_COLON + CHILDREN_EL, XMLUtils.EMPTY_ATTRIBUTES);
           Iterator widgetIt = widgets.iterator();
           while (widgetIt.hasNext()) {
               Widget widget = (Widget)widgetIt.next();
  
  
  
  1.3       +3 -2      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/ContainerDelegate.java
  
  Index: ContainerDelegate.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/ContainerDelegate.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContainerDelegate.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ ContainerDelegate.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -24,6 +24,7 @@
   
   import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.forms.FormContext;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -95,7 +96,7 @@
       }
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
  -        contentHandler.startElement(Constants.INSTANCE_NS, WIDGETS_EL, Constants.INSTANCE_PREFIX_COLON + WIDGETS_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, WIDGETS_EL, Constants.INSTANCE_PREFIX_COLON + WIDGETS_EL, XMLUtils.EMPTY_ATTRIBUTES);
           Iterator widgetIt = widgets.iterator();
           while (widgetIt.hasNext()) {
               Widget widget = (Widget)widgetIt.next();
  
  
  
  1.4       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Field.java	9 Mar 2004 13:08:45 -0000	1.3
  +++ Field.java	9 Mar 2004 13:17:26 -0000	1.4
  @@ -26,6 +26,7 @@
   import org.apache.cocoon.forms.validation.ValidationError;
   import org.apache.cocoon.forms.validation.ValidationErrorAware;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -236,7 +237,7 @@
           contentHandler.startElement(Constants.INSTANCE_NS, FIELD_EL, Constants.INSTANCE_PREFIX_COLON + FIELD_EL, fieldAttrs);
   
           if (enteredValue != null || value != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
               String stringValue;
               if (value != null) {
                   stringValue = getDatatype().convertToString(value, locale);
  @@ -249,7 +250,7 @@
   
           // validation message element: only present if the value is not valid
           if (validationError != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, XMLUtils.EMPTY_ATTRIBUTES);
               validationError.generateSaxFragment(contentHandler);
               contentHandler.endElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL);
           }
  
  
  
  1.3       +3 -2      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/BooleanField.java
  
  Index: BooleanField.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/BooleanField.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BooleanField.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ BooleanField.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -20,6 +20,7 @@
   import org.apache.cocoon.forms.event.ValueChangedEvent;
   import org.apache.cocoon.forms.event.WidgetEvent;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
   
  @@ -85,7 +86,7 @@
           contentHandler.startElement(Constants.INSTANCE_NS, BOOLEAN_FIELD_EL, Constants.INSTANCE_PREFIX_COLON + BOOLEAN_FIELD_EL, fieldAttrs);
   
           // value element
  -        contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +        contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
           String stringValue = String.valueOf(value != null && value.booleanValue() == true? "true": "false");
           contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
           contentHandler.endElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL);
  
  
  
  1.3       +4 -3      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AggregateField.java
  
  Index: AggregateField.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/AggregateField.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AggregateField.java	9 Mar 2004 13:08:45 -0000	1.2
  +++ AggregateField.java	9 Mar 2004 13:17:26 -0000	1.3
  @@ -21,6 +21,7 @@
   import org.apache.cocoon.forms.util.I18nMessage;
   import org.apache.cocoon.forms.validation.ValidationError;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.excalibur.xml.sax.XMLizable;
   import org.apache.oro.text.regex.MatchResult;
   import org.apache.oro.text.regex.PatternMatcher;
  @@ -215,7 +216,7 @@
           contentHandler.startElement(Constants.INSTANCE_NS, AGGREGATEFIELD_EL, Constants.INSTANCE_PREFIX_COLON + AGGREGATEFIELD_EL, aggregatedFieldAttrs);
   
           if (enteredValue != null || value != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON + VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
               String stringValue;
               if (value != null) {
                   stringValue = getDatatype().convertToString(value, locale);
  @@ -228,7 +229,7 @@
   
           // validation message element: only present if the value is not valid
           if (validationError != null) {
  -            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, XMLUtils.EMPTY_ATTRIBUTES);
               validationError.generateSaxFragment(contentHandler);
               contentHandler.endElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL);
           }
  
  
  
  1.2       +4 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/util/I18nMessage.java
  
  Index: I18nMessage.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/util/I18nMessage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- I18nMessage.java	9 Mar 2004 10:34:09 -0000	1.1
  +++ I18nMessage.java	9 Mar 2004 13:17:27 -0000	1.2
  @@ -15,9 +15,9 @@
    */
   package org.apache.cocoon.forms.util;
   
  -import org.apache.cocoon.forms.Constants;
   import org.apache.cocoon.transformation.I18nTransformer;
   import org.apache.cocoon.xml.AttributesImpl;
  +import org.apache.cocoon.xml.XMLUtils;
   import org.apache.excalibur.xml.sax.XMLizable;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  @@ -104,7 +104,7 @@
       public void toSAX(ContentHandler contentHandler) throws SAXException {
           contentHandler.startPrefixMapping("i18n", I18nTransformer.I18N_NAMESPACE_URI);
           if (parameters != null) {
  -            contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TRANSLATE_ELEMENT, "i18n:" + I18nTransformer.I18N_TRANSLATE_ELEMENT, Constants.EMPTY_ATTRS);
  +            contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TRANSLATE_ELEMENT, "i18n:" + I18nTransformer.I18N_TRANSLATE_ELEMENT, XMLUtils.EMPTY_ATTRIBUTES);
           }
   
           AttributesImpl i18nAttrs = new AttributesImpl();
  @@ -119,7 +119,7 @@
           // the parameters
           if (parameters != null) {
               for (int i = 0; i < parameters.length; i++) {
  -                contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_PARAM_ELEMENT, "i18n:" + I18nTransformer.I18N_PARAM_ELEMENT, Constants.EMPTY_ATTRS);
  +                contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_PARAM_ELEMENT, "i18n:" + I18nTransformer.I18N_PARAM_ELEMENT, XMLUtils.EMPTY_ATTRIBUTES);
                   if (keys != null && keys[i])
                       contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT, "i18n:" + I18nTransformer.I18N_TEXT_ELEMENT, i18nAttrs);
                   contentHandler.characters(parameters[i].toCharArray(), 0, parameters[i].length());
  
  
  
  1.4       +1 -5      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/Constants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Constants.java	9 Mar 2004 13:08:46 -0000	1.3
  +++ Constants.java	9 Mar 2004 13:17:27 -0000	1.4
  @@ -15,9 +15,6 @@
    */
   package org.apache.cocoon.forms;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.helpers.AttributesImpl;
  -
   /**
    * Various constants used in the form framework.
    * 
  @@ -53,5 +50,4 @@
       /** I18n catalogue containing the built-in messages. */
       public static final String I18N_CATALOGUE = "forms";
   
  -    public static final Attributes EMPTY_ATTRS = new AttributesImpl();
   }