Author: mrglavas
Date: Sun Apr 25 16:24:33 2010
New Revision: 937817

URL: http://svn.apache.org/viewvc?rev=937817&view=rev
Log:
Eliminating code in XMLAttributeImpl for storing whether an attribute has a 
schema ID type. Should save a bit of memory and also time in the schema 
validator. Nothing ever used this mechanism. The schema IDness of an attribute 
is retrieved from the PSVI.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/XMLAttributesImpl.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=937817&r1=937816&r2=937817&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 Sun Apr 25 16:24:33 2010
@@ -3418,17 +3418,9 @@ public class XMLSchemaValidator
         try {
             actualValue = attDV.validate(attrValue, fValidationState, 
fValidatedInfo);
             // store the normalized value
-            if (fNormalizeData)
+            if (fNormalizeData) {
                 attributes.setValue(index, fValidatedInfo.normalizedValue);
-            if (attributes instanceof XMLAttributesImpl) {
-                XMLAttributesImpl attrs = (XMLAttributesImpl) attributes;
-                boolean schemaId =
-                    fValidatedInfo.memberType != null
-                        ? fValidatedInfo.memberType.isIDType()
-                        : attDV.isIDType();
-                attrs.setSchemaId(index, schemaId);
             }
-
             // PSVI: element notation
             if (attDV.getVariety() == XSSimpleType.VARIETY_ATOMIC
                 && attDV.getPrimitiveKind() == 
XSSimpleType.PRIMITIVE_NOTATION) {
@@ -3577,12 +3569,6 @@ public class XMLSchemaValidator
                     XMLAttributesImpl attrs = (XMLAttributesImpl) attributes;
                     attrIndex = attrs.getLength();
                     attrs.addAttributeNS(attName, "CDATA", normalized);
-                    boolean schemaId =
-                        defaultValue != null
-                            && defaultValue.memberType != null
-                                ? defaultValue.memberType.isIDType()
-                                : currDecl.fType.isIDType();
-                    attrs.setSchemaId(attrIndex, schemaId);
                 }
                 else {
                     attrIndex = attributes.addAttribute(attName, "CDATA", 
normalized);

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/XMLAttributesImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/XMLAttributesImpl.java?rev=937817&r1=937816&r2=937817&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/XMLAttributesImpl.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/XMLAttributesImpl.java
 Sun Apr 25 16:24:33 2010
@@ -737,26 +737,6 @@ public class XMLAttributesImpl
     } // getURI(int,QName)
 
     // Implementation methods
-    public void setSchemaId(int attrIndex, boolean schemaId) {
-        fAttributes[attrIndex].schemaId = schemaId;
-    }
-    public boolean getSchemaId(int index) {
-        if (index < 0 || index >= fLength) {
-            return false;
-        }
-        return fAttributes[index].schemaId;
-    }
-    public boolean getSchemaId(String qname) {
-        int index = getIndex(qname);
-        return index != -1 ? fAttributes[index].schemaId : false; 
-    } // getType(String):String
-    public boolean getSchemaId(String uri, String localName) {
-        if (!fNamespaces) {
-            return false;
-        }
-        int index = getIndex(uri, localName);
-        return index != -1 ? fAttributes[index].schemaId : false;
-    } // getType(String,String):String
     
     /**
      * Look up the index of an attribute by XML 1.0 qualified name.
@@ -1061,9 +1041,6 @@ public class XMLAttributesImpl
 
         /** Specified. */
         public boolean specified;
-
-        /** Schema ID type. */
-        public boolean schemaId;
         
         /** 
          * Augmentations information for this attribute.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to