You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2001/11/19 22:05:22 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/util XMLAttributesImpl.java

neilg       01/11/19 13:05:22

  Modified:    java/src/org/apache/xerces/util XMLAttributesImpl.java
  Log:
  fix XMLAttributesImpl so that getType() returns NMTOKEN for an enumerated list of attributes, as its javadoc (and that of the XNI interface it implements) advertise
  
  Revision  Changes    Path
  1.8       +6 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLAttributesImpl.java	2001/10/03 18:31:18	1.7
  +++ XMLAttributesImpl.java	2001/11/19 21:05:21	1.8
  @@ -79,7 +79,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLAttributesImpl.java,v 1.7 2001/10/03 18:31:18 elena Exp $
  + * @version $Id: XMLAttributesImpl.java,v 1.8 2001/11/19 21:05:21 neilg Exp $
    */
   public class XMLAttributesImpl
       implements XMLAttributes, AttributeList, Attributes {
  @@ -360,7 +360,11 @@
           if (index < 0 || index >= fLength) {
               return null;
           }
  -        return fAttributes[index].type;
  +        String type = fAttributes[index].type;
  +        if(type.indexOf('(') == 0 && type.lastIndexOf(')') == type.length()-1) {
  +            return "NMTOKEN";
  +        }
  +        return type;
       } // getType(int):String
   
       /**
  
  
  

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