You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by lm...@apache.org on 2001/05/03 23:52:24 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/validators/common XMLValidator.java

lmartin     01/05/03 14:52:24

  Modified:    java/src/org/apache/xerces/validators/common
                        XMLValidator.java
  Log:
  complexType def properties correct constraint checking
  
  Revision  Changes    Path
  1.140     +5 -3      xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java
  
  Index: XMLValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- XMLValidator.java	2001/05/01 13:56:09	1.139
  +++ XMLValidator.java	2001/05/03 21:52:19	1.140
  @@ -123,7 +123,7 @@
   /**
    * This class is the super all-in-one validator used by the parser.
    *
  - * @version $Id: XMLValidator.java,v 1.139 2001/05/01 13:56:09 neilg Exp $
  + * @version $Id: XMLValidator.java,v 1.140 2001/05/03 21:52:19 lmartin Exp $
    */
   public final class XMLValidator
       implements DefaultEntityHandler.EventHandler,
  @@ -3045,6 +3045,7 @@
                     while (baseTypeInfo != null) {
                        elementIndex = fGrammar.getElementDeclIndex(element, baseTypeInfo.scopeDefined);
                        if (elementIndex > -1 ) {
  +                        System.out.println("found element index for " + fStringPool.toString(element.localpart));
                           // update the current Grammar NS index if resolving element succeed.
                           fGrammarNameSpaceIndex = aGrammarNSIndex;
                           break;
  @@ -3219,7 +3220,7 @@
                        //
                        // The type must not be abstract
                        //
  -                     if (typeInfo.isAbstract) {
  +                     if (typeInfo.isAbstractType()) {
                           reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR,
                                  XMLMessages.SCHEMA_GENERIC_ERROR, 
                                  "Abstract type " + xsiType + " should not be used in xsi:type"); 
  @@ -3269,7 +3270,8 @@
                  TraverseSchema.ComplexTypeInfo typeInfo =
                    ((SchemaGrammar) fGrammar).getElementComplexTypeInfo(elementIndex);
   
  -               if (typeInfo != null && typeInfo.isAbstract) {
  +               if (typeInfo != null && 
  +                   typeInfo.isAbstractType()) {
                     reportRecoverableXMLError(XMLMessages.MSG_GENERIC_SCHEMA_ERROR,
                      XMLMessages.SCHEMA_GENERIC_ERROR,
                      "Element " + fStringPool.toString(element.rawname) + " is declared with a type that is abstract.  Use xsi:type to specify a non-abstract type");
  
  
  

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