You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/10/31 18:40:10 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/framework XMLAttrList.java XMLParser.java

jeffreyr    00/10/31 09:40:09

  Modified:    java/src/org/apache/xerces/framework XMLAttrList.java
                        XMLParser.java
  Log:
  patch by Tamura Kent - fixes normalization attribute values- this add the normalization feature
  
  Revision  Changes    Path
  1.5       +12 -1     xml-xerces/java/src/org/apache/xerces/framework/XMLAttrList.java
  
  Index: XMLAttrList.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/framework/XMLAttrList.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLAttrList.java	2000/05/19 02:27:19	1.4
  +++ XMLAttrList.java	2000/10/31 17:40:06	1.5
  @@ -94,7 +94,7 @@
    * may be used to access the attribute list through the SAX <code>AttributeList</code>
    * interface.
    *
  - * @version $Id: XMLAttrList.java,v 1.4 2000/05/19 02:27:19 andyc Exp $
  + * @version $Id: XMLAttrList.java,v 1.5 2000/10/31 17:40:06 jeffreyr Exp $
    */
   public final class XMLAttrList 
       implements AttributeList {
  @@ -301,6 +301,17 @@
           int chunk = attrIndex >> CHUNK_SHIFT;
           int index = attrIndex & CHUNK_MASK;
           return fAttValue[chunk][index];
  +    }
  +
  +    /**
  +     * Sets the value of the attribute.
  +     */
  +    public void setAttValue(int attrIndex, int attrValue) {
  +        if (attrIndex < 0 || attrIndex >= fAttrCount)
  +            return;
  +        int chunk = attrIndex >> CHUNK_SHIFT;
  +        int index = attrIndex & CHUNK_MASK;
  +        fAttValue[chunk][index] = attrValue;
       }
   
       /** Sets the type of the attribute. */
  
  
  
  1.23      +16 -2     xml-xerces/java/src/org/apache/xerces/framework/XMLParser.java
  
  Index: XMLParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/framework/XMLParser.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XMLParser.java	2000/08/11 22:31:52	1.22
  +++ XMLParser.java	2000/10/31 17:40:07	1.23
  @@ -90,7 +90,7 @@
   /**
    * This is the base class of all standard parsers.
    *
  - * @version $Id: XMLParser.java,v 1.22 2000/08/11 22:31:52 ericye Exp $
  + * @version $Id: XMLParser.java,v 1.23 2000/10/31 17:40:07 jeffreyr Exp $
    */
   public abstract class XMLParser 
       implements XMLErrorReporter, XMLDocumentHandler.DTDHandler {
  @@ -593,6 +593,14 @@
           throws SAXNotRecognizedException, SAXNotSupportedException {
           return fValidator.getDynamicValidationEnabled();
       }
  +
  +    /**
  +     *
  +     */
  +    protected void setNormalizeAttributeValues(boolean normalize) {
  +        fValidator.setNormalizeAttributeValues(normalize);
  +    }
  +
       /**
        * Allows the parser to have the choice to load DTD grammar when 
        * validation is off.
  @@ -1147,7 +1155,13 @@
                   throw new SAXNotSupportedException(featureId);
               }
               //
  -            // http://apache.org/xml/features/validation/default-attribute-values
  +            // http://apache.org/xml/features/validation/normalize-attribute-values
  +            //
  +            if (feature.equals("validation/normalize-attribute-values")) {
  +                setNormalizeAttributeValues(state);
  +            }
  +            //
  +            // http://apache.org/xml/features/validation/validate-content-models
               //
               if (feature.equals("validation/validate-content-models")) {
                   // REVISIT