jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
changeset 12458 d601e4bba306
parent 12457 c348e06f0e82
child 17534 21dc0b2762da
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Thu Apr 12 08:38:26 2012 -0700
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Tue Apr 17 11:17:59 2012 -0700
@@ -233,6 +233,8 @@
     protected static final String SCHEMA_DV_FACTORY =
         Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
 
+    protected static final String USE_SERVICE_MECHANISM = Constants.ORACLE_FEATURE_SERVICE_MECHANISM;
+
     // recognized features and properties
 
     /** Recognized features. */
@@ -250,7 +252,8 @@
             HONOUR_ALL_SCHEMALOCATIONS,
             USE_GRAMMAR_POOL_ONLY,
             NAMESPACE_GROWTH,
-            TOLERATE_DUPLICATES
+            TOLERATE_DUPLICATES,
+            USE_SERVICE_MECHANISM
     };
 
     /** Feature defaults. */
@@ -272,7 +275,8 @@
         null,
         null,
         null,
-        null
+        null,
+        Boolean.TRUE
     };
 
     /** Recognized properties. */
@@ -3488,7 +3492,8 @@
                 if (fIdentityConstraint.getCategory() == IdentityConstraint.IC_KEY) {
                     String code = "AbsentKeyValue";
                     String eName = fIdentityConstraint.getElementName();
-                    reportSchemaError(code, new Object[] { eName });
+                    String cName = fIdentityConstraint.getIdentityConstraintName();
+                    reportSchemaError(code, new Object[] { eName, cName });
                 }
                 return;
             }
@@ -3503,9 +3508,9 @@
                 if (fIdentityConstraint.getCategory() == IdentityConstraint.IC_KEY) {
                     String code = "KeyNotEnoughValues";
                     UniqueOrKey key = (UniqueOrKey) fIdentityConstraint;
-                    String ename = fIdentityConstraint.getElementName();
-                    String kname = key.getIdentityConstraintName();
-                    reportSchemaError(code, new Object[] { ename, kname });
+                    String eName = fIdentityConstraint.getElementName();
+                    String cName = key.getIdentityConstraintName();
+                    reportSchemaError(code, new Object[] { eName, cName });
                 }
                 return;
             }
@@ -3558,12 +3563,15 @@
             // do we even know this field?
             if (i == -1) {
                 String code = "UnknownField";
-                reportSchemaError(code, new Object[] { field.toString()});
+                String eName = fIdentityConstraint.getElementName();
+                String cName = fIdentityConstraint.getIdentityConstraintName();
+                reportSchemaError(code, new Object[] { field.toString(), eName, cName });
                 return;
             }
             if (Boolean.TRUE != mayMatch(field)) {
                 String code = "FieldMultipleMatch";
-                reportSchemaError(code, new Object[] { field.toString()});
+                String cName = fIdentityConstraint.getIdentityConstraintName();
+                reportSchemaError(code, new Object[] { field.toString(), cName });
             } else {
                 fValuesCount++;
             }
@@ -3844,8 +3852,9 @@
             if (contains()) {
                 String code = "DuplicateUnique";
                 String value = toString(fLocalValues);
-                String ename = fIdentityConstraint.getElementName();
-                reportSchemaError(code, new Object[] { value, ename });
+                String eName = fIdentityConstraint.getElementName();
+                String cName = fIdentityConstraint.getIdentityConstraintName();
+                reportSchemaError(code, new Object[] { value, eName, cName });
             }
         } // duplicateValue(Hashtable)
 
@@ -3880,8 +3889,9 @@
             if (contains()) {
                 String code = "DuplicateKey";
                 String value = toString(fLocalValues);
-                String ename = fIdentityConstraint.getElementName();
-                reportSchemaError(code, new Object[] { value, ename });
+                String eName = fIdentityConstraint.getElementName();
+                String cName = fIdentityConstraint.getIdentityConstraintName();
+                reportSchemaError(code, new Object[] { value, eName, cName });
             }
         } // duplicateValue(Hashtable)