You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2003/01/23 18:27:13 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/xni Augmentations.java NamespaceContext.java XMLAttributes.java

sandygao    2003/01/23 09:27:13

  Modified:    java/src/org/apache/xerces/dom DOMNormalizer.java
               java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
               java/src/org/apache/xerces/util AugmentationsImpl.java
                        XMLAttributesImpl.java
               java/src/org/apache/xerces/xni Augmentations.java
                        NamespaceContext.java XMLAttributes.java
  Log:
  XNI API changes as per Andy's suggestion:
  1. Augmentations: rename "clear" to "removeAllItems";
  2. NamespaceContext: clarify what the "reset()" method is responsible for;
  3. XMLAttributes: add a new method "setAugmentations".
  
  Revision  Changes    Path
  1.27      +11 -1     xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java
  
  Index: DOMNormalizer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- DOMNormalizer.java	17 Jan 2003 14:30:03 -0000	1.26
  +++ DOMNormalizer.java	23 Jan 2003 17:27:11 -0000	1.27
  @@ -1169,6 +1169,16 @@
               // REVISIT: implement
               return null;
           }
  +
  +        /**
  +         * Sets the augmentations of the attribute at the specified index.
  +         * 
  +         * @param attrIndex The attribute index.
  +         * @param augs      The augmentations.
  +         */
  +        public void setAugmentations(int attrIndex, Augmentations augs) {
  +            fAugmentations.setElementAt(augs, attrIndex);
  +        }
       }
   
       // 
  
  
  
  1.133     +2 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
  
  Index: XMLSchemaValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- XMLSchemaValidator.java	20 Jan 2003 13:55:56 -0000	1.132
  +++ XMLSchemaValidator.java	23 Jan 2003 17:27:11 -0000	1.133
  @@ -2281,7 +2281,7 @@
       Augmentations getEmptyAugs(Augmentations augs) {
           if (augs == null) {
               augs = fAugmentations;
  -            augs.clear();
  +            augs.removeAllItems();
           }
           augs.putItem(Constants.ELEMENT_PSVI, fCurrentPSVI);
           fCurrentPSVI.reset();
  
  
  
  1.7       +2 -2      xml-xerces/java/src/org/apache/xerces/util/AugmentationsImpl.java
  
  Index: AugmentationsImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/AugmentationsImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AugmentationsImpl.java	9 Aug 2002 15:18:19 -0000	1.6
  +++ AugmentationsImpl.java	23 Jan 2003 17:27:12 -0000	1.7
  @@ -131,7 +131,7 @@
       /**
        * Remove all objects from the Augmentations structure.
        */
  -    public void clear (){
  +    public void removeAllItems() {
           fAugmentationsContainer.clear();
       }
   
  
  
  
  1.18      +12 -2     xml-xerces/java/src/org/apache/xerces/util/XMLAttributesImpl.java
  
  Index: XMLAttributesImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/XMLAttributesImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XMLAttributesImpl.java	16 Sep 2002 21:47:00 -0000	1.17
  +++ XMLAttributesImpl.java	23 Jan 2003 17:27:12 -0000	1.18
  @@ -190,7 +190,7 @@
           }
   
           // clear augmentations
  -        fAugmentations[index].clear();
  +        fAugmentations[index].removeAllItems();
   
           // set values
           Attribute attribute = fAttributes[index];
  @@ -654,6 +654,16 @@
               return null;
           }
           return fAugmentations[attributeIndex];
  +    }
  +
  +    /**
  +     * Sets the augmentations of the attribute at the specified index.
  +     * 
  +     * @param attrIndex The attribute index.
  +     * @param augs      The augmentations.
  +     */
  +    public void setAugmentations(int attrIndex, Augmentations augs) {
  +        fAugmentations[attrIndex] = augs;
       }
   
       /**
  
  
  
  1.6       +2 -2      xml-xerces/java/src/org/apache/xerces/xni/Augmentations.java
  
  Index: Augmentations.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Augmentations.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Augmentations.java	9 Aug 2002 15:18:20 -0000	1.5
  +++ Augmentations.java	23 Jan 2003 17:27:12 -0000	1.6
  @@ -122,6 +122,6 @@
       /**
        * Remove all objects from the Augmentations structure.
        */
  -    public void clear ();
  +    public void removeAllItems ();
   
   }
  
  
  
  1.10      +4 -1      xml-xerces/java/src/org/apache/xerces/xni/NamespaceContext.java
  
  Index: NamespaceContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/NamespaceContext.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- NamespaceContext.java	16 Dec 2002 01:26:21 -0000	1.9
  +++ NamespaceContext.java	23 Jan 2003 17:27:12 -0000	1.10
  @@ -205,6 +205,9 @@
        *
        * <p>It is necessary to invoke this method before reusing the
        * Namespace support object for a new session.</p>
  +     * 
  +     * <p>Note that implementations of this method need to ensure that
  +     * the declaration of the prefixes "xmlns" and "xml" are available.</p>
        */
       public void reset();
       
  
  
  
  1.9       +9 -1      xml-xerces/java/src/org/apache/xerces/xni/XMLAttributes.java
  
  Index: XMLAttributes.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/XMLAttributes.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XMLAttributes.java	29 Jan 2002 01:15:19 -0000	1.8
  +++ XMLAttributes.java	23 Jan 2003 17:27:12 -0000	1.9
  @@ -417,5 +417,13 @@
       public Augmentations getAugmentations(String qName);
   
   
  +    /**
  +     * Sets the augmentations of the attribute at the specified index.
  +     * 
  +     * @param attrIndex The attribute index.
  +     * @param augs      The augmentations.
  +     */
  +    public void setAugmentations(int attrIndex, Augmentations augs);
  +
   
   } // interface XMLAttributes
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org