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 2002/03/01 16:24:01 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/parsers AbstractSAXParser.java
sandygao 02/03/01 07:24:01
Modified: java/src/org/apache/xerces/parsers AbstractSAXParser.java
Log:
Fixing bug [6776]: fields from schema PSVI items should be checked
before being used, in case the instance was not fully validated.
Revision Changes Path
1.25 +6 -2 xml-xerces/java/src/org/apache/xerces/parsers/AbstractSAXParser.java
Index: AbstractSAXParser.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractSAXParser.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- AbstractSAXParser.java 17 Feb 2002 23:46:15 -0000 1.24
+++ AbstractSAXParser.java 1 Mar 2002 15:24:01 -0000 1.25
@@ -111,7 +111,7 @@
* @author Arnaud Le Hors, IBM
* @author Andy Clark, IBM
*
- * @version $Id: AbstractSAXParser.java,v 1.24 2002/02/17 23:46:15 andyc Exp $
+ * @version $Id: AbstractSAXParser.java,v 1.25 2002/03/01 15:24:01 sandygao Exp $
*/
public abstract class AbstractSAXParser
extends AbstractXMLDocumentParser
@@ -400,9 +400,11 @@
for (int i = len - 1; i >= 0; i--) {
attributes.getName(i, fQName);
// change attribute value to normalized value
+ // REVISIT: should this happen here? why not in schema validator?
if (fNormalizeData) {
AttributePSVI attrPSVI = (AttributePSVI)attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_PSVI);
- if (attrPSVI != null) {
+ if (attrPSVI != null &&
+ attrPSVI.getValidationAttempted() == AttributePSVI.FULL_VALIDATION) {
attributes.setValue(i, attrPSVI.getSchemaNormalizedValue());
}
}
@@ -469,6 +471,8 @@
String value = null;
// normalized value for element is stored in schema_normalize_value property
// of PSVI element.
+ // REVISIT: should this happen here? why not in schema validator?
+ // REVISIT: how to determine whether the value is trustable?
if (fNormalizeData && augs != null) {
ElementPSVI elemPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
if (elemPSVI != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org