cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel BooleanField.java Field.java Form.java MultiValueField.java Repeater.java
Date Wed, 14 May 2003 11:45:45 GMT
bruno       2003/05/14 04:45:44

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/datatype
                        StaticSelectionList.java ValidationError.java
               src/blocks/woody/java/org/apache/cocoon/woody/formmodel
                        BooleanField.java Field.java Form.java
                        MultiValueField.java Repeater.java
  Log:
  Use Cocoon's AttributesImpl
  
  Revision  Changes    Path
  1.2       +2 -2      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/StaticSelectionList.java
  
  Index: StaticSelectionList.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/StaticSelectionList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StaticSelectionList.java	22 Apr 2003 12:04:18 -0000	1.1
  +++ StaticSelectionList.java	14 May 2003 11:45:43 -0000	1.2
  @@ -52,9 +52,9 @@
   
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.components.sax.XMLByteStreamInterpreter;
  +import org.apache.cocoon.xml.AttributesImpl;
   
   import java.util.List;
   import java.util.ArrayList;
  @@ -116,7 +116,7 @@
           public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException
           {
               AttributesImpl itemAttrs = new AttributesImpl();
  -            itemAttrs.addAttribute("", "value", "value", "CDATA", datatype.convertToString(value));
  +            itemAttrs.addCDATAAttribute("value", datatype.convertToString(value));
               contentHandler.startElement(Constants.WI_NS, ITEM_EL, Constants.WI_PREFIX_COLON
+ ITEM_EL, itemAttrs);
               contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON
+ LABEL_EL, Constants.EMPTY_ATTRS);
               if (label != null) {
  
  
  
  1.2       +3 -3      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/ValidationError.java
  
  Index: ValidationError.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/ValidationError.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ValidationError.java	22 Apr 2003 12:04:18 -0000	1.1
  +++ ValidationError.java	14 May 2003 11:45:43 -0000	1.2
  @@ -52,10 +52,10 @@
   
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   import org.apache.cocoon.components.sax.XMLByteStreamInterpreter;
   import org.apache.cocoon.transformation.I18nTransformer;
   import org.apache.cocoon.woody.Constants;
  +import org.apache.cocoon.xml.AttributesImpl;
   
   /**
    * An object that holds a validation error message. The error message can
  @@ -129,7 +129,7 @@
   
               // the i18n:text element
               AttributesImpl i18nAttrs = new AttributesImpl();
  -            i18nAttrs.addAttribute(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_CATALOGUE_ATTRIBUTE,
"i18n:" + I18nTransformer.I18N_CATALOGUE_ATTRIBUTE, "CDATA", "woody");
  +            i18nAttrs.addCDATAAttribute(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_CATALOGUE_ATTRIBUTE,
"i18n:" + I18nTransformer.I18N_CATALOGUE_ATTRIBUTE, "woody");
   
               contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT,
"i18n:" + I18nTransformer.I18N_TEXT_ELEMENT, i18nAttrs);
               contentHandler.characters(errorMessage.toCharArray(), 0, errorMessage.length());
  @@ -153,7 +153,7 @@
               contentHandler.startPrefixMapping("i18n", I18nTransformer.I18N_NAMESPACE_URI);
   
               AttributesImpl i18nAttrs = new AttributesImpl();
  -            i18nAttrs.addAttribute(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_CATALOGUE_ATTRIBUTE,
"i18n:" + I18nTransformer.I18N_CATALOGUE_ATTRIBUTE, "CDATA", "woody");
  +            i18nAttrs.addCDATAAttribute(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_CATALOGUE_ATTRIBUTE,
"i18n:" + I18nTransformer.I18N_CATALOGUE_ATTRIBUTE, "woody");
   
               contentHandler.startElement(I18nTransformer.I18N_NAMESPACE_URI, I18nTransformer.I18N_TEXT_ELEMENT,
"i18n:" + I18nTransformer.I18N_TEXT_ELEMENT, i18nAttrs);
               contentHandler.characters(errorMessage.toCharArray(), 0, errorMessage.length());
  
  
  
  1.3       +2 -2      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/BooleanField.java
  
  Index: BooleanField.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/BooleanField.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BooleanField.java	14 May 2003 11:33:37 -0000	1.2
  +++ BooleanField.java	14 May 2003 11:45:44 -0000	1.3
  @@ -52,9 +52,9 @@
   
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
  +import org.apache.cocoon.xml.AttributesImpl;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   
   import java.util.Locale;
   
  @@ -100,7 +100,7 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
           AttributesImpl fieldAttrs = new AttributesImpl();
  -        fieldAttrs.addAttribute("", "id", "id", "CDATA", getFullyQualifiedId());
  +        fieldAttrs.addCDATAAttribute("id", getFullyQualifiedId());
           contentHandler.startElement(Constants.WI_NS, BOOLEAN_FIELD_EL, Constants.WI_PREFIX_COLON
+ BOOLEAN_FIELD_EL, fieldAttrs);
   
           // value element
  
  
  
  1.3       +3 -3      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Field.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Field.java	14 May 2003 11:33:37 -0000	1.2
  +++ Field.java	14 May 2003 11:45:44 -0000	1.3
  @@ -53,9 +53,9 @@
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
   import org.apache.cocoon.woody.datatype.ValidationError;
  +import org.apache.cocoon.xml.AttributesImpl;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   
   import java.util.Locale;
   
  @@ -141,8 +141,8 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
           AttributesImpl fieldAttrs = new AttributesImpl();
  -        fieldAttrs.addAttribute("", "id", "id", "CDATA", getFullyQualifiedId());
  -        fieldAttrs.addAttribute("", "required", "required", "CDATA", String.valueOf(definition.isRequired()));
  +        fieldAttrs.addCDATAAttribute("id", getFullyQualifiedId());
  +        fieldAttrs.addCDATAAttribute("required", String.valueOf(definition.isRequired()));
           contentHandler.startElement(Constants.WI_NS, FIELD_EL, Constants.WI_PREFIX_COLON
+ FIELD_EL, fieldAttrs);
   
           if (enteredValue != null || value != null) {
  
  
  
  1.3       +2 -2      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Form.java
  
  Index: Form.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Form.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Form.java	14 May 2003 11:33:37 -0000	1.2
  +++ Form.java	14 May 2003 11:45:44 -0000	1.3
  @@ -52,9 +52,9 @@
   
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
  +import org.apache.cocoon.xml.AttributesImpl;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   
   import java.util.*;
   
  @@ -134,7 +134,7 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
           AttributesImpl formAttrs = new AttributesImpl();
  -        formAttrs.addAttribute("", "id", "id", "CDATA", definition.getId());
  +        formAttrs.addCDATAAttribute("id", definition.getId());
   
           contentHandler.startElement(Constants.WI_NS, FORM_EL, Constants.WI_PREFIX_COLON
+ FORM_EL, Constants.EMPTY_ATTRS);
           definition.generateLabel(contentHandler);
  
  
  
  1.3       +2 -2      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueField.java
  
  Index: MultiValueField.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueField.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MultiValueField.java	14 May 2003 11:33:37 -0000	1.2
  +++ MultiValueField.java	14 May 2003 11:45:44 -0000	1.3
  @@ -53,9 +53,9 @@
   import org.apache.cocoon.woody.datatype.ValidationError;
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
  +import org.apache.cocoon.xml.AttributesImpl;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   
   import java.util.Locale;
   
  @@ -136,7 +136,7 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
           AttributesImpl attrs = new AttributesImpl();
  -        attrs.addAttribute("", "id", "id", "CDATA", getFullyQualifiedId());
  +        attrs.addCDATAAttribute("id", getFullyQualifiedId());
           contentHandler.startElement(Constants.WI_NS, MULTIVALUEFIELD_EL, Constants.WI_PREFIX_COLON
+ MULTIVALUEFIELD_EL, attrs);
   
           contentHandler.startElement(Constants.WI_NS, VALUES_EL, Constants.WI_PREFIX_COLON
+ VALUES_EL, Constants.EMPTY_ATTRS);
  
  
  
  1.3       +6 -6      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Repeater.java
  
  Index: Repeater.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Repeater.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Repeater.java	14 May 2003 11:33:37 -0000	1.2
  +++ Repeater.java	14 May 2003 11:45:44 -0000	1.3
  @@ -52,9 +52,9 @@
   
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
  +import org.apache.cocoon.xml.AttributesImpl;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   
   import java.util.*;
   
  @@ -162,8 +162,8 @@
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
           AttributesImpl repeaterAttrs = new AttributesImpl();
  -        repeaterAttrs.addAttribute("", "id", "id", "CDATA", getFullyQualifiedId());
  -        repeaterAttrs.addAttribute("", "size", "size", "CDATA", String.valueOf(getSize()));
  +        repeaterAttrs.addCDATAAttribute("id", getFullyQualifiedId());
  +        repeaterAttrs.addCDATAAttribute("size", String.valueOf(getSize()));
           contentHandler.startElement(Constants.WI_NS, REPEATER_EL, Constants.WI_PREFIX_COLON
+ REPEATER_EL, repeaterAttrs);
   
           // the repeater's label
  @@ -210,8 +210,8 @@
        */
       public void generateSize(ContentHandler contentHandler) throws SAXException {
           AttributesImpl attrs = new AttributesImpl();
  -        attrs.addAttribute("", "id", "id", "CDATA", getFullyQualifiedId());
  -        attrs.addAttribute("", "size", "size", "CDATA", String.valueOf(getSize()));
  +        attrs.addCDATAAttribute("id", getFullyQualifiedId());
  +        attrs.addCDATAAttribute("size", String.valueOf(getSize()));
           contentHandler.startElement(Constants.WI_NS, REPEATER_SIZE_EL, Constants.WI_PREFIX_COLON
+ REPEATER_SIZE_EL, attrs);
           contentHandler.endElement(Constants.WI_NS, REPEATER_SIZE_EL, Constants.WI_PREFIX_COLON
+ REPEATER_SIZE_EL);
       }
  @@ -294,7 +294,7 @@
   
           public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
               AttributesImpl rowAttrs = new AttributesImpl();
  -            rowAttrs.addAttribute("", "id", "id", "CDATA", getFullyQualifiedId());
  +            rowAttrs.addCDATAAttribute("id", getFullyQualifiedId());
               contentHandler.startElement(Constants.WI_NS, ROW_EL, Constants.WI_PREFIX_COLON
+ ROW_EL, rowAttrs);
               Iterator widgetIt = widgets.iterator();
               while (widgetIt.hasNext()) {
  
  
  

Mime
View raw message