sandygao 2003/04/02 06:15:21
Modified: java/src/org/apache/xerces/impl/xs AttributePSVImpl.java
XMLSchemaValidator.java
Log:
Fixing bugs 18603: schema default value returned from attribute PSVI
wasn't correct.
Revision Changes Path
1.16 +2 -6
xml-xerces/java/src/org/apache/xerces/impl/xs/AttributePSVImpl.java
Index: AttributePSVImpl.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/AttributePSVImpl.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AttributePSVImpl.java 20 Jan 2003 13:55:56 -0000 1.15
+++ AttributePSVImpl.java 2 Apr 2003 14:15:20 -0000 1.16
@@ -103,9 +103,6 @@
/** validation context: could be QName or XPath expression*/
protected String fValidationContext = null;
- /** schema default */
- protected String fSchemaDefault = null;
-
//
// AttributePSVI methods
//
@@ -117,7 +114,7 @@
* @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema
Part 1: Structures [schema default]</a>
*/
public String getSchemaDefault() {
- return fSchemaDefault;
+ return fDeclaration == null ? null : fDeclaration.getConstraintValue();
}
/**
@@ -217,7 +214,6 @@
public void reset() {
fNormalizedValue = null;
fDeclaration = null;
- fSchemaDefault = null;
fTypeDecl = null;
fSpecified = false;
fMemberType = null;
1.138 +1 -4
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.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- XMLSchemaValidator.java 24 Mar 2003 21:10:58 -0000 1.137
+++ XMLSchemaValidator.java 2 Apr 2003 14:15:20 -0000 1.138
@@ -2681,8 +2681,6 @@
if (fAugPSVI) {
// PSVI: attribute declaration
attrPSVI.fDeclaration = currDecl;
- if (currDecl != null && currDecl.fDefault != null)
- attrPSVI.fSchemaDefault = currDecl.fDefault.toString();
// PSVI: attribute type
attrPSVI.fTypeDecl = attDV;
@@ -2774,7 +2772,6 @@
attrPSVI.fTypeDecl = currDecl.fType;
attrPSVI.fMemberType = defaultValue.memberType;
attrPSVI.fNormalizedValue = normalized;
- attrPSVI.fSchemaDefault = normalized;
attrPSVI.fValidationContext = fValidationRoot;
attrPSVI.fValidity = AttributePSVI.VALIDITY_VALID;
attrPSVI.fValidationAttempted = AttributePSVI.VALIDATION_FULL;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]