You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2011/11/24 07:11:13 UTC
svn commit: r1205731 - in
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl:
msg/XMLSchemaMessages.properties xs/traversers/XSDAbstractTraverser.java
xs/traversers/XSDComplexTypeTraverser.java
Author: mukulg
Date: Thu Nov 24 06:11:12 2011
New Revision: 1205731
URL: http://svn.apache.org/viewvc?rev=1205731&view=rev
Log:
making changes to implement the schema 1.1 error code src-assert.3.13.1 consistently for <assert> and <assertion>.
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/traversers/XSDAbstractTraverser.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.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=1205731&r1=1205730&r2=1205731&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 Nov 24 06:11:12 2011
@@ -186,7 +186,7 @@
src-type-alternative.3.12.13.2 = src-type-alternative.3.12.13.2: Type definition missing for type atlernative. A ''type'' attribute, or a ''complexType'' child element, or a ''simpleType'' child element must be present.
src-wildcard.1 = src-wildcard.1: The properties ''namespace'' and ''notNamespace'' cannot both be present in a wildcard declaration. Use only one of them.
src-cip.1 = src-cip.1: The attribute ''{0}'' does not belong to schema versioning namespace (http://www.w3.org/2007/XMLSchema-versioning). Only following attributes are available for schema versioning namespace : ''minVersion'', ''maxVersion'', ''typeAvailable'', ''typeUnavailable'', ''facetAvailable'' and ''facetUnavailable''.
- src-assert.3.13.1 = src-assert.3.13.1: The mandatory attribute ''test'' does not appear on the element ''assert'', within type definition ''{0}''.
+ src-assert.3.13.1 = src-assert.3.13.1: The mandatory attribute ''test'' does not appear on the element ''{0}'', within type definition ''{1}''.
#constraint valid (3.X.6)
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java?rev=1205731&r1=1205730&r2=1205731&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Thu Nov 24 06:11:12 2011
@@ -38,6 +38,7 @@ import org.apache.xerces.impl.xs.asserti
import org.apache.xerces.impl.xs.assertion.XSAssertImpl;
import org.apache.xerces.impl.xs.util.XInt;
import org.apache.xerces.impl.xs.util.XSObjectListImpl;
+import org.apache.xerces.impl.xs.util.XSTypeHelper;
import org.apache.xerces.util.DOMUtil;
import org.apache.xerces.util.NamespaceSupport;
import org.apache.xerces.util.SymbolTable;
@@ -535,10 +536,8 @@ abstract class XSDAbstractTraverser {
// add assertion object, to the list of assertions to be processed
assertData.addElement(assertImpl);
} else {
- // 'test' attribute is mandatory in assert element
- reportSchemaError("src-assert.3.13.1",
- new Object[] { DOMUtil.getLocalName(content) },
- content);
+ // 'test' attribute is mandatory on an <assertion> element
+ reportSchemaError("src-assert.3.13.1", new Object[] { DOMUtil.getLocalName(content), XSTypeHelper.getSchemaTypeName(typeDef) }, content);
}
} else {
if (facet.equals(SchemaSymbols.ELT_MINLENGTH)) {
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java?rev=1205731&r1=1205730&r2=1205731&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java Thu Nov 24 06:11:12 2011
@@ -1759,8 +1759,8 @@ class XSDComplexTypeTraverser extends X
}
}
} else {
- // 'test' attribute is mandatory on an assert element
- reportSchemaError("src-assert.3.13.1", new Object[] { XSTypeHelper.getSchemaTypeName(enclosingCT) }, assertElement);
+ // 'test' attribute is mandatory on an <assert> element
+ reportSchemaError("src-assert.3.13.1", new Object[] { DOMUtil.getLocalName(assertElement), XSTypeHelper.getSchemaTypeName(enclosingCT) }, assertElement);
}
fAttrChecker.returnAttrArray(attrValues, schemaDoc);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org