Author: mukulg
Date: Wed Apr 6 11:07:41 2011
New Revision: 1089399
URL: http://svn.apache.org/viewvc?rev=1089399&view=rev
Log:
committing a slight improvement for the schema 1.1 assertions error code
cvc-assertions-valid-context. this error code is now deleted and this is now
been handled with a regular XPath dynamic context error.
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=1089399&r1=1089398&r2=1089399&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
Wed Apr 6 11:07:41 2011
@@ -107,8 +107,7 @@
cvc-type.3.1.3 = cvc-type.3.1.3: The value ''{1}'' of element ''{0}''
is not valid.
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 = cvc-assertions-valid: Value ''{0}'' is not
facet-valid with respect to assertion ''{1}''. {2}
- 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 = cvc-assertions-valid: Value ''{0}'' is not
facet-valid with respect to assertion ''{1}''. {2}
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}''.
cvc-xpath.3.13.4.2a = cvc-xpath.3.13.4.2a: XPST0003 - Assertion XPath
expression (''{0}'') on the schema type ''{1}'' couldn''t compile successfully.
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=1089399&r1=1089398&r2=1089399&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
Wed Apr 6 11:07:41 2011
@@ -512,18 +512,13 @@ public class XMLAssertPsychopathXPath2Im
assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList, null);
}
}
+ /*
catch (DynamicError ex) {
- if ("XPDY0002".equals(ex.code())) {
- // ref: http://www.w3.org/TR/xpath20/#eval_context
- assertionError = new
AssertionError("cvc-assertions-valid-context", element, assertImpl, value,
isList, ex);
- }
- else {
- assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList, ex);
- }
+ assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList, ex);
}
catch (StaticError ex) {
assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList, ex);
- }
+ } */
catch(Exception ex) {
assertionError = new AssertionError("cvc-assertion", element,
assertImpl, value, isList, ex);
}
@@ -658,12 +653,7 @@ public class XMLAssertPsychopathXPath2Im
if (!userDefinedMessage.endsWith(".")) {
userDefinedMessage = userDefinedMessage + ".";
}
- if ("cvc-assertions-valid-context".equals(key)) {
- userDefinedMessage = "Assertion failed (undefined context) for
schema type '" + typeNameStr + "'. " + userDefinedMessage;
- }
- else {
- userDefinedMessage = "Assertion failed for schema type '" +
typeNameStr + "'. " + userDefinedMessage;
- }
+ userDefinedMessage = "Assertion failed for schema type '" +
typeNameStr + "'. " + userDefinedMessage;
fXmlSchemaValidator.reportSchemaError("cvc-assertion-failure-mesg",
new Object[] {userDefinedMessage, mesgSuffix});
}
else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]