You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2010/05/25 15:43:57 UTC
svn commit: r948040 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org