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 2013/01/03 15:53:36 UTC

svn commit: r1428373 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLSchemaValidator.java util/XS11TypeHelper.java

Author: mukulg
Date: Thu Jan  3 14:53:36 2013
New Revision: 1428373

URL: http://svn.apache.org/viewvc?rev=1428373&view=rev
Log:
schema 1.1 commit: committing a minor fix to produce non null strings for XSD type names in error messages, when xsi:type attribute is used.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.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=1428373&r1=1428372&r2=1428373&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 Thu Jan  3 14:53:36 2013
@@ -3220,7 +3220,7 @@ public class XMLSchemaValidator
             if (!fXSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) {
                 reportSchemaError(
                         "cvc-elt.4.3",
-                        new Object[] { element.rawname, xsiType, fCurrentType.getName()});
+                        new Object[] { element.rawname, xsiType, XS11TypeHelper.getSchemaTypeName(fCurrentType)});
             }
         }
 
@@ -3295,7 +3295,7 @@ public class XMLSchemaValidator
             }
             if (!fXSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) {
                 errorList.add("cvc-elt.4.3");
-                errorList.add(new Object[] { element.rawname, xsiType, fCurrentType.getName()});
+                errorList.add(new Object[] { element.rawname, xsiType, XS11TypeHelper.getSchemaTypeName(fCurrentType)});
             }
         }
 

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java?rev=1428373&r1=1428372&r2=1428373&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java Thu Jan  3 14:53:36 2013
@@ -266,8 +266,8 @@ public class XS11TypeHelper {
     
     
     /*
-     * Get string value of type name of an XML Schema type definition. This method is useful if XML Schema validator specific names,
-     * of anonymous types are also needed.
+     * Get name of an XSD type definition as a string value (which will typically be the value of "name" attribute of a
+     * type definition, or an internal name determined by the validator for anonymous types).
      */
     public static String getSchemaTypeName(XSTypeDefinition typeDefn) {
         



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org