You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2010/04/25 18:22:28 UTC
svn commit: r937816 - in /xerces/java/trunk/src/org/apache/xerces:
impl/xs/XMLSchemaValidator.java util/XMLAttributesImpl.java
Author: mrglavas
Date: Sun Apr 25 16:22:27 2010
New Revision: 937816
URL: http://svn.apache.org/viewvc?rev=937816&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/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
xerces/java/trunk/src/org/apache/xerces/util/XMLAttributesImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=937816&r1=937815&r2=937816&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Sun Apr 25 16:22:27 2010
@@ -3076,17 +3076,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) {
@@ -3235,12 +3227,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/trunk/src/org/apache/xerces/util/XMLAttributesImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/util/XMLAttributesImpl.java?rev=937816&r1=937815&r2=937816&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/util/XMLAttributesImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/util/XMLAttributesImpl.java Sun Apr 25 16:22:27 2010
@@ -736,26 +736,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.
@@ -1060,9 +1040,6 @@ public class XMLAttributesImpl
/** Specified. */
public boolean specified;
-
- /** Schema ID type. */
- public boolean schemaId;
/**
* Augmentations information for this attribute.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org