Author: knoaman
Date: Tue May 25 13:43:56 2010
New Revision: 948040

URL: http://svn.apache.org/viewvc?rev=948040&view=rev
Log:
Fix for Jira bug: https://issues.apache.org/jira/browse/XERCESJ-1439

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=948040&r1=948039&r2=948040&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 Tue May 25 13:43:56 2010
@@ -3561,6 +3561,19 @@ public class XMLSchemaValidator
             }
             // if the attribute is not specified, then apply the value 
constraint
             if (!isSpecified && constType != XSConstants.VC_NONE) {
+                
+                // Apply extra checking rules (ID/IDREF/ENTITY)
+                final XSSimpleType attDV = currDecl.fType;
+                final boolean facetChecking = 
fValidationState.needFacetChecking(); 
+                try {
+                    fValidationState.setFacetChecking(false);
+                    attDV.validate(fValidationState, defaultValue);
+                } 
+                catch (InvalidDatatypeValueException idve) {
+                    reportSchemaError(idve.getKey(), idve.getArgs());
+                }
+                fValidationState.setFacetChecking(facetChecking);
+                
                 attName =
                     new QName(null, currDecl.fName, currDecl.fName, 
currDecl.fTargetNamespace);
                 String normalized = (defaultValue != null) ? 
defaultValue.stringValue() : "";



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to