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/05/02 17:56:49 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
sandygao 02/05/02 08:56:49
Modified: java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
Log:
we always store the normalized value, even if it's invlid, because it might
still be useful to the user. But when the value is not valid, the normalized
value is not trustable.
Revision Changes Path
1.59 +6 -3 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.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- XMLSchemaValidator.java 29 Apr 2002 16:52:22 -0000 1.58
+++ XMLSchemaValidator.java 2 May 2002 15:56:49 -0000 1.59
@@ -141,7 +141,7 @@
* @author Elena Litani IBM
* @author Andy Clark IBM
* @author Neeraj Bajaj, Sun Microsystems, inc.
- * @version $Id: XMLSchemaValidator.java,v 1.58 2002/04/29 16:52:22 elena Exp $
+ * @version $Id: XMLSchemaValidator.java,v 1.59 2002/05/02 15:56:49 sandygao Exp $
*/
public class XMLSchemaValidator
implements XMLComponent, XMLDocumentFilter, FieldActivator {
@@ -2616,8 +2616,6 @@
Object actualValue = null;
try {
actualValue = attDV.validate(attrValue, fValidationState, fValidatedInfo);
- // PSVI: attribute normalized value
- attrPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
// PSVI: attribute memberType
attrPSVI.fMemberType = fValidatedInfo.memberType;
// PSVI: element notation
@@ -2643,6 +2641,11 @@
attrPSVI.addErrorCode("cvc-attribute.3");
reportSchemaError("cvc-attribute.3", new Object[]{element.rawname, fTempQName.rawname, attrValue});
}
+ // PSVI: attribute normalized value
+ // NOTE: we always store the normalized value, even if it's invlid,
+ // because it might still be useful to the user. But when the it's
+ // not valid, the normalized value is not trustable.
+ attrPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
// get the value constraint from use or decl
// 4 The item's actual value must match the value of the {value constraint}, if it is present and fixed. // now check the value against the simpleType
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org