Hi,
The AttributePSVI's SchemaNormalizedValue will be set only when the attribute
is validated i.e. when the validation and validation/schema features are on.
And it is exposed based on the schema/normalized-value feature.
The current code exposes the schema normalized value of the attribute
even if the validation is off and validation/schema is on (i.e validation
is not attempted), in which case it will be null.
Please find the attached patch.
-Pavani
--
Pavani Mukthipudi
Sun Microsystems, Inc.
Phone: 080 - 2298989 Extn: 87390
Index: AbstractDOMParser.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java,v
retrieving revision 1.41
diff -u -r1.41 AbstractDOMParser.java
--- AbstractDOMParser.java 19 Feb 2002 11:27:32 -0000 1.41
+++ AbstractDOMParser.java 22 Feb 2002 12:26:28 -0000
@@ -716,7 +716,9 @@
String attrValue = attributes.getValue(i);
if (fNormalizeData) {
AttributePSVI attrPSVI =
(AttributePSVI)attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_PSVI);
- if (attrPSVI != null) {
+ // If validation is not attempted, the SchemaNormalizedValue will
+be null.
+ // So we shouldn't take that value in this case.
+ if (attrPSVI != null && attrPSVI.getValidationAttempted() !=
+AttributePSVI.NO_VALIDATION) {
attrValue = attrPSVI.getSchemaNormalizedValue();
}
@@ -751,7 +753,9 @@
String attrValue = attributes.getValue(i);
if (fNormalizeData) {
AttributePSVI attrPSVI =
(AttributePSVI)attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_PSVI);
- if (attrPSVI != null) {
+ // If validation is not attempted, the SchemaNormalizedValue will
+be null.
+ // So we shouldn't take that value in this case.
+ if (attrPSVI != null && attrPSVI.getValidationAttempted() !=
+AttributePSVI.NO_VALIDATION) {
attrValue = attrPSVI.getSchemaNormalizedValue();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]