Author: mukulg
Date: Thu Mar 24 16:47:42 2011
New Revision: 1085036
URL: http://svn.apache.org/viewvc?rev=1085036&view=rev
Log:
changing one of the assertions error key. the earlier key was causing confusion
between xs:assert failures and those of xs:assertion. though this key is not
perfect still (it is still common for both these cases), and we could probably
try to refactor the assertions error messages devising new appropriate keys to
distinguish between failure cases of xs:assert and xs:assertion. for now, this
change looks better to me than the earlier codebase for assertions error key.
i'll try to do the proposed changes as above, sometime later.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties?rev=1085036&r1=1085035&r2=1085036&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
Thu Mar 24 16:47:42 2011
@@ -105,8 +105,8 @@
cvc-type.3.1.1 = cvc-type.3.1.1: Element ''{0}'' is a simple type, so
it cannot have attributes, excepting those whose namespace name is identical to
''http://www.w3.org/2001/XMLSchema-instance'' and whose [local name] is one of
''type'', ''nil'', ''schemaLocation'' or ''noNamespaceSchemaLocation''.
However, the attribute, ''{1}'' was found.
cvc-type.3.1.2 = cvc-type.3.1.2: Element ''{0}'' is a simple type, so
it must have no element information item [children].
cvc-type.3.1.3 = cvc-type.3.1.3: The value ''{1}'' of element ''{0}''
is not valid.
- cvc-assertion.3.13.4.1 = cvc-assertion.3.13.4.1: Assertion evaluation
(''{1}'') for element ''{0}'' on schema type ''{2}'' did not succeed. {3}
- cvc-assertion.3.13.4.1-failure-mesg =
cvc-assertion.3.13.4.1-failure-mesg: {0} {1}
+ cvc-assertion = cvc-assertion: Assertion evaluation (''{1}'') for
element ''{0}'' on schema type ''{2}'' did not succeed. {3}
+ cvc-assertion-failure-mesg = cvc-assertion-failure-mesg: {0} {1}
cvc-assertions-valid-context = cvc-assertions-valid-context: Assertion
evaluation (''{1}'') for element ''{0}'' on schema type ''{2}'' did not succeed
(undefined context). {3}
cvc-assertions-valid-union-elem = cvc-assertions-valid-union-elem:
Value ''{0}'' is not facet-valid with respect to the specified assertions, on
type ''{2}'' on element ''{1}''.
cvc-assertions-valid-union-attr = cvc-assertions-valid-union-attr:
Value ''{0}'' is not facet-valid with respect to the specified assertions, on
type ''{3}'' on attribute ''{2}'/@'{1}''.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1085036&r1=1085035&r2=1085036&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
Thu Mar 24 16:47:42 2011
@@ -510,7 +510,7 @@ public class XMLAssertPsychopathXPath2Im
if (!result) {
// assertion evaluation is false
- assertionError = new AssertionError("cvc-assertion.3.13.4.1",
element, assertImpl, value, isList);
+ assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList);
}
}
catch (DynamicError ex) {
@@ -519,14 +519,14 @@ public class XMLAssertPsychopathXPath2Im
assertionError = new
AssertionError("cvc-assertions-valid-context", element, assertImpl, value,
isList);
}
else {
- assertionError = new AssertionError("cvc-assertion.3.13.4.1",
element, assertImpl, value, isList);
+ assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList);
}
}
catch (StaticError ex) {
- assertionError = new AssertionError("cvc-assertion.3.13.4.1",
element, assertImpl, value, isList);
+ assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList);
}
catch(Exception ex) {
- assertionError = new AssertionError("cvc-assertion.3.13.4.1",
element, assertImpl, value, isList);
+ assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList);
}
return assertionError;
@@ -651,7 +651,7 @@ public class XMLAssertPsychopathXPath2Im
else {
message = "Assertion failed for schema type '" + typeNameStr +
"'. " + message;
}
-
fXmlSchemaValidator.reportSchemaError("cvc-assertion.3.13.4.1-failure-mesg",
new Object[] {message, listAssertErrMessage});
+ fXmlSchemaValidator.reportSchemaError("cvc-assertion-failure-mesg",
new Object[] {message, listAssertErrMessage});
}
else {
fXmlSchemaValidator.reportSchemaError(key, new Object[]
{elemErrorAnnotation, assertImpl.getTest().getXPath().toString(), typeNameStr,
listAssertErrMessage});
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]