You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2003/01/14 21:21:48 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs/util NSItemListImpl.java StringListImpl.java XSNamedMapImpl.java XSObjectListImpl.java ObjectListImpl.java

elena       2003/01/14 12:21:48

  Modified:    java/src/org/apache/xerces/impl/dv XSSimpleType.java
               java/src/org/apache/xerces/impl/dv/xs XSSimpleTypeDecl.java
               java/src/org/apache/xerces/impl/xs SchemaGrammar.java
                        SubstitutionGroupHandler.java
                        XMLSchemaValidator.java XSAttributeDecl.java
                        XSAttributeGroupDecl.java XSAttributeUseImpl.java
                        XSComplexTypeDecl.java XSConstraints.java
                        XSElementDecl.java XSGroupDecl.java
                        XSModelGroupImpl.java XSModelImpl.java
                        XSNotationDecl.java XSParticleDecl.java
                        XSWildcardDecl.java
               java/src/org/apache/xerces/impl/xs/identity Field.java
                        IdentityConstraint.java KeyRef.java
                        XPathMatcher.java
               java/src/org/apache/xerces/impl/xs/psvi PSVIProvider.java
                        StringList.java XSAnnotation.java
                        XSAttributeDeclaration.java
                        XSAttributeGroupDefinition.java XSAttributeUse.java
                        XSComplexTypeDefinition.java XSConstants.java
                        XSElementDeclaration.java XSModel.java
                        XSModelGroup.java XSModelGroupDefinition.java
                        XSNamedMap.java XSNamespaceItem.java
                        XSNotationDeclaration.java XSObject.java
                        XSObjectList.java XSParticle.java
                        XSSimpleTypeDefinition.java XSTerm.java
                        XSTypeDefinition.java XSWildcard.java
               java/src/org/apache/xerces/impl/xs/traversers
                        XSDAbstractTraverser.java
                        XSDAttributeTraverser.java
                        XSDComplexTypeTraverser.java
                        XSDElementTraverser.java
                        XSDSimpleTypeTraverser.java
               java/src/org/apache/xerces/impl/xs/util StringListImpl.java
                        XSNamedMapImpl.java XSObjectListImpl.java
  Added:       java/src/org/apache/xerces/impl/xs/psvi XSIDCDefinition.java
                        XSNamespaceItemList.java
               java/src/org/apache/xerces/impl/xs/util NSItemListImpl.java
  Removed:     java/src/org/apache/xerces/impl/xs/psvi ObjectList.java
                        XSIDConstraintDefinition.java
               java/src/org/apache/xerces/impl/xs/util ObjectListImpl.java
  Log:
  Modify PSVI interfaces
  
  Revision  Changes    Path
  1.12      +2 -3      xml-xerces/java/src/org/apache/xerces/impl/dv/XSSimpleType.java
  
  Index: XSSimpleType.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/XSSimpleType.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XSSimpleType.java	20 Nov 2002 00:49:47 -0000	1.11
  +++ XSSimpleType.java	14 Jan 2003 20:21:44 -0000	1.12
  @@ -58,7 +58,6 @@
   package org.apache.xerces.impl.dv;
   
   import org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
   
   /**
    * This interface <code>XSSimpleType</code> represents the simple type
  @@ -71,7 +70,7 @@
    *
    * @version $Id$
    */
  -public interface XSSimpleType extends XSTypeDecl, XSSimpleTypeDefinition {
  +public interface XSSimpleType extends XSSimpleTypeDefinition {
   
       /**
        * constants defined for the values of 'whitespace' facet.
  
  
  
  1.27      +43 -25    xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java
  
  Index: XSSimpleTypeDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XSSimpleTypeDecl.java	9 Dec 2002 20:38:17 -0000	1.26
  +++ XSSimpleTypeDecl.java	14 Jan 2003 20:21:44 -0000	1.27
  @@ -57,22 +57,28 @@
   
   package org.apache.xerces.impl.dv.xs;
   
  -import org.apache.xerces.impl.dv.XSSimpleType;
  -import org.apache.xerces.impl.dv.XSFacets;
  +import java.util.StringTokenizer;
  +import java.util.Vector;
  +
   import org.apache.xerces.impl.dv.DatatypeException;
  -import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
   import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
  +import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
   import org.apache.xerces.impl.dv.ValidatedInfo;
   import org.apache.xerces.impl.dv.ValidationContext;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
  -import org.apache.xerces.impl.xs.psvi.*;
  +import org.apache.xerces.impl.dv.XSFacets;
  +import org.apache.xerces.impl.dv.XSSimpleType;
  +import org.apache.xerces.impl.xpath.regex.RegularExpression;
  +import org.apache.xerces.impl.xs.psvi.StringList;
  +import org.apache.xerces.impl.xs.psvi.XSAnnotation;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSSimpleTypeDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.impl.xs.util.StringListImpl;
   import org.apache.xerces.impl.xs.util.XSObjectListImpl;
   import org.apache.xerces.util.XMLChar;
  -import org.apache.xerces.impl.xpath.regex.RegularExpression;
   import org.apache.xerces.xni.NamespaceContext;
  -import java.util.Vector;
  -import java.util.StringTokenizer;
   
   /**
    * @author Sandy Gao, IBM
  @@ -484,7 +490,7 @@
           return fFinalSet;
       }
   
  -    public boolean getIsFinal(short derivation) {
  +    public boolean isFinal(short derivation) {
           return (fFinalSet & derivation) != 0;
       }
   
  @@ -492,7 +498,7 @@
           return fBase;
       }
   
  -    public boolean getIsAnonymous() {
  +    public boolean getAnonymous() {
           return fTypeName == null;
       }
   
  @@ -1727,19 +1733,19 @@
           return fOrdered;
       }
   
  -    public boolean getIsBounded(){
  +    public boolean getBounded(){
           return fBounded;
       }
   
  -    public boolean getIsFinite(){
  +    public boolean getFinite(){
           return fFinite;
       }
   
  -    public boolean getIsNumeric(){
  +    public boolean getNumeric(){
           return fNumeric;
       }
   
  -    public boolean getIsDefinedFacet(short facetName) {
  +    public boolean isDefinedFacet(short facetName) {
           return (fFacetsDefined & facetName) != 0;
       }
   
  @@ -1747,7 +1753,7 @@
           return fFacetsDefined;
       }
   
  -    public boolean getIsFixedFacet(short facetName) {
  +    public boolean isFixedFacet(short facetName) {
           return (fFixedFacet & facetName) != 0;
       }
   
  @@ -1781,7 +1787,7 @@
           return null;
       }
   
  -    public StringList getLexicalEnumerations() {
  +    public StringList getLexicalEnumeration() {
           if (fEnumeration == null)
               return null;
           
  @@ -1793,7 +1799,7 @@
           return new StringListImpl(strs, size);
       }
   
  -    public StringList getLexicalPatterns() {
  +    public StringList getLexicalPattern() {
           if (fPatternStr == null)
               return null;
   
  @@ -1874,7 +1880,7 @@
           else if(fVariety == VARIETY_UNION){
               XSSimpleType[] memberTypes = fMemberTypes;
               for(int i = 0 ; i < memberTypes.length ; i++){
  -                if(!memberTypes[i].getIsNumeric() ){
  +                if(!memberTypes[i].getNumeric() ){
                       this.fNumeric = false;
                       return;
                   }
  @@ -1914,7 +1920,7 @@
               }
   
               for(int i = 0 ; i < memberTypes.length ; i++){
  -                if(!memberTypes[i].getIsBounded() || (ancestorId != getPrimitiveDV(memberTypes[i].fValidationDV)) ){
  +                if(!memberTypes[i].getBounded() || (ancestorId != getPrimitiveDV(memberTypes[i].fValidationDV)) ){
                       this.fBounded = false;
                       return;
                   }
  @@ -1971,7 +1977,7 @@
           else if(fVariety == VARIETY_UNION){
               XSSimpleType [] memberTypes = fMemberTypes;
               for(int i = 0 ; i < memberTypes.length ; i++){
  -                if(!(memberTypes[i].getIsFinite()) ){
  +                if(!(memberTypes[i].getFinite()) ){
                       this.fFinite = false;
                       return;
                   }
  @@ -1995,7 +2001,9 @@
   
       }//getPrimitiveDV()
   
  -    public boolean derivedFrom(XSTypeDefinition ancestor) {
  +    public boolean derivedFromType(XSTypeDefinition ancestor, short derivation) {
  +        // REVISIT: implement according to derivation
  +        
           // ancestor is null, retur false
           if (ancestor == null)
               return false;
  @@ -2013,7 +2021,9 @@
           return type == ancestor;
       }
       
  -    public boolean derivedFrom(String ancestorNS, String ancestorName) {
  +    public boolean derivedFrom(String ancestorNS, String ancestorName, short derivation) {
  +        // REVISIT: implement according to derivation
  +        
           // ancestor is null, retur false
           if (ancestorName == null)
               return false;
  @@ -2024,12 +2034,12 @@
           }
   
           // recursively get base, and compare it with ancestor
  -        XSTypeDecl type = this;
  +        XSTypeDefinition type = this;
           while (!(ancestorName.equals(type.getName()) &&
                    ((ancestorNS == null && type.getNamespace() == null) ||
                     (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) &&   // compare with ancestor
                  type != fAnySimpleType) {  // reached anySimpleType
  -            type = (XSTypeDecl)type.getBaseType();
  +            type = (XSTypeDefinition)type.getBaseType();
           }
   
           return type != fAnySimpleType;
  @@ -2173,4 +2183,12 @@
   
           // REVISIT: reset for fundamental facets
       }
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class XSSimpleTypeDecl
  
  
  
  1.27      +41 -27    xml-xerces/java/src/org/apache/xerces/impl/xs/SchemaGrammar.java
  
  Index: SchemaGrammar.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/SchemaGrammar.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- SchemaGrammar.java	27 Aug 2002 18:41:40 -0000	1.26
  +++ SchemaGrammar.java	14 Jan 2003 20:21:45 -0000	1.27
  @@ -57,21 +57,35 @@
   
   package org.apache.xerces.impl.xs;
   
  +import java.util.Vector;
  +
   import org.apache.xerces.impl.dv.SchemaDVFactory;
  -import org.apache.xerces.impl.dv.XSSimpleType;
   import org.apache.xerces.impl.dv.ValidatedInfo;
  +import org.apache.xerces.impl.dv.XSSimpleType;
   import org.apache.xerces.impl.xs.identity.IdentityConstraint;
  -import org.apache.xerces.impl.xs.util.*;
  -import org.apache.xerces.impl.xs.psvi.*;
  -import org.apache.xerces.util.SymbolTable;
  +import org.apache.xerces.impl.xs.psvi.StringList;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeGroupDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSElementDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSModel;
  +import org.apache.xerces.impl.xs.psvi.XSModelGroupDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSNamedMap;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSNotationDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSParticle;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSWildcard;
  +import org.apache.xerces.impl.xs.util.SimpleLocator;
  +import org.apache.xerces.impl.xs.util.StringListImpl;
  +import org.apache.xerces.impl.xs.util.XSNamedMap4Types;
  +import org.apache.xerces.impl.xs.util.XSNamedMapImpl;
  +import org.apache.xerces.impl.xs.util.XSObjectListImpl;
   import org.apache.xerces.util.SymbolHash;
  -
   import org.apache.xerces.xni.grammars.Grammar;
  -import org.apache.xerces.xni.grammars.XSGrammar;
   import org.apache.xerces.xni.grammars.XMLGrammarDescription;
  -
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import org.apache.xerces.xni.grammars.XSGrammar;
   
   /**
    * This class is to hold all schema component declaration that are declared
  @@ -254,7 +268,7 @@
           public void addGlobalNotationDecl(XSNotationDecl decl) {
               // ignore
           }
  -        public void addGlobalTypeDecl(XSTypeDecl decl) {
  +        public void addGlobalTypeDecl(XSTypeDefinition decl) {
               // ignore
           }
           public void addComplexTypeDecl(XSComplexTypeDecl decl, SimpleLocator locator) {
  @@ -344,7 +358,7 @@
       /**
        * register one global type
        */
  -    public void addGlobalTypeDecl(XSTypeDecl decl) {
  +    public void addGlobalTypeDecl(XSTypeDefinition decl) {
           fGlobalTypeDecls.put(decl.getName(), decl);
       }
   
  @@ -394,8 +408,8 @@
       /**
        * get one global type
        */
  -    public final XSTypeDecl getGlobalTypeDecl(String declName) {
  -        return(XSTypeDecl)fGlobalTypeDecls.get(declName);
  +    public final XSTypeDefinition getGlobalTypeDecl(String declName) {
  +        return(XSTypeDefinition)fGlobalTypeDecls.get(declName);
       }
   
       /**
  @@ -535,7 +549,7 @@
   
           // overridden methods
           public void setValues(String name, String targetNamespace,
  -                XSTypeDecl baseType, short derivedBy, short schemaFinal, 
  +                XSTypeDefinition baseType, short derivedBy, short schemaFinal, 
                   short block, short contentType,
                   boolean isAbstract, XSAttributeGroupDecl attrGrp, 
                   XSSimpleType simpleType, XSParticleDecl particle) {
  @@ -682,7 +696,7 @@
       private XSNamedMap[] fComponents = null;
   
       // store the documents and their locations contributing to this namespace
  -    // REVISIT: use StringList and ObjectList for there fields.
  +    // REVISIT: use StringList and XSObjectList for there fields.
       private Vector fDocuments = null;
       private Vector fLocations = null;
       
  @@ -782,7 +796,7 @@
        * @return A top-level attribute declaration or null if such declaration
        *   does not exist.
        */
  -    public XSAttributeDeclaration getAttributeDecl(String name) {
  +    public XSAttributeDeclaration getAttributeDeclaration(String name) {
           return getGlobalAttributeDecl(name);
       }
   
  @@ -792,7 +806,7 @@
        * @return A top-level element declaration or null if such declaration
        *   does not exist.
        */
  -    public XSElementDeclaration getElementDecl(String name) {
  +    public XSElementDeclaration getElementDeclaration(String name) {
           return getGlobalElementDecl(name);
       }
   
  @@ -824,18 +838,10 @@
        * @return A top-level notation declaration or null if such declaration
        *         does not exist.
        */
  -    public XSNotationDeclaration getNotationDecl(String name) {
  +    public XSNotationDeclaration getNotationDeclaration(String name) {
           return getGlobalNotationDecl(name);
       }
   
  -    /**
  -     * [document]
  -     * @see <a href="http://www.w3.org/TR/xmlschema-1/#sd-document">[document]</a>
  -     * @return a list of document information item
  -     */
  -    public ObjectList getDocuments() {
  -        return new ObjectListImpl(fDocuments);
  -    }
   
       /**
        * [document location]
  @@ -855,5 +861,13 @@
       public XSModel toXSModel() {
           return new XSModelImpl(new SchemaGrammar[]{this});
       }
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSNamespaceItem#getAnnotations()
  +	 */
  +	public XSObjectList getAnnotations() {
  +        // REVISIT: implement
  +		return null;
  +	}
   
   } // class SchemaGrammar
  
  
  
  1.9       +6 -5      xml-xerces/java/src/org/apache/xerces/impl/xs/SubstitutionGroupHandler.java
  
  Index: SubstitutionGroupHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/SubstitutionGroupHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SubstitutionGroupHandler.java	9 Jul 2002 20:49:00 -0000	1.8
  +++ SubstitutionGroupHandler.java	14 Jan 2003 20:21:45 -0000	1.9
  @@ -58,6 +58,7 @@
   package org.apache.xerces.impl.xs;
   
   import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.xni.QName;
   import java.util.Hashtable;
   import java.util.Vector;
  @@ -128,15 +129,15 @@
           short devMethod = 0, blockConstraint = blockingConstraint;
   
           // initialize the derivation method to be that of the type of D
  -        XSTypeDecl type = element.fType;
  -        if (type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE)
  +        XSTypeDefinition type = element.fType;
  +        if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
               devMethod = ((XSComplexTypeDecl)type).fDerivedBy;
           else
               devMethod = XSConstants.DERIVATION_RESTRICTION;
   
           // initialize disallowed substitution to the passed in blocking constraint
           type = exemplar.fType;
  -        if (type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE)
  +        if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
               blockConstraint |= ((XSComplexTypeDecl)type).fBlock;
   
           // 2 There is a chain of {substitution group affiliation}s from D to C, that is, either D's {substitution group affiliation} is C, or D's {substitution group affiliation}'s {substitution group affiliation} is C, or . . .
  @@ -145,7 +146,7 @@
               // add the derivation method and disallowed substitution info
               // of the current type to the corresponding variables
               type = subGroup.fType;
  -            if (type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +            if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                   devMethod |= ((XSComplexTypeDecl)type).fDerivedBy;
                   blockConstraint |= ((XSComplexTypeDecl)type).fBlock;
               } else {
  
  
  
  1.128     +24 -23    xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
  
  Index: XMLSchemaValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- XMLSchemaValidator.java	31 Dec 2002 01:55:06 -0000	1.127
  +++ XMLSchemaValidator.java	14 Jan 2003 20:21:45 -0000	1.128
  @@ -72,6 +72,7 @@
   import org.apache.xerces.impl.xs.models.XSCMValidator;
   import org.apache.xerces.impl.xs.psvi.XSConstants;
   import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.impl.msg.XMLMessageFormatter;
   import org.apache.xerces.impl.validation.ValidationState;
   import org.apache.xerces.impl.XMLEntityManager;
  @@ -876,7 +877,7 @@
           // When it's a complex type with element-only content, we need to
           // find out whether the content contains any non-whitespace character.
           boolean allWhiteSpace = true;
  -        if (fCurrentType != null && fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +        if (fCurrentType != null && fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
               XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
               if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT) {
                   // data outside of element content
  @@ -1117,10 +1118,10 @@
       XSNotationDecl[] fNotationStack = new XSNotationDecl[INITIAL_STACK_SIZE];
   
       /** Current type. */
  -    XSTypeDecl fCurrentType;
  +    XSTypeDefinition fCurrentType;
   
       /** type stack. */
  -    XSTypeDecl[] fTypeStack = new XSTypeDecl[INITIAL_STACK_SIZE];
  +    XSTypeDefinition[] fTypeStack = new XSTypeDefinition[INITIAL_STACK_SIZE];
   
       /** Current content model. */
       XSCMValidator fCurrentCM;
  @@ -1484,7 +1485,7 @@
               System.arraycopy(fNotationStack, 0, newArrayN, 0, fElementDepth);
               fNotationStack = newArrayN;
   
  -            XSTypeDecl[] newArrayT = new XSTypeDecl[newSize];
  +            XSTypeDefinition[] newArrayT = new XSTypeDefinition[newSize];
               System.arraycopy(fTypeStack, 0, newArrayT, 0, fElementDepth);
               fTypeStack = newArrayT;
   
  @@ -1546,7 +1547,7 @@
           
           // When it's a complex type with element-only content, we need to
           // find out whether the content contains any non-whitespace character.
  -        if (fCurrentType != null && fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +        if (fCurrentType != null && fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
               XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
               if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT) {
                   // data outside of element content
  @@ -1828,7 +1829,7 @@
   
           // Element Locally Valid (Element)
           // 2 Its {abstract} must be false.
  -        if (fCurrentElemDecl != null && fCurrentElemDecl.getIsAbstract())
  +        if (fCurrentElemDecl != null && fCurrentElemDecl.getAbstract())
               reportSchemaError("cvc-elt.2", new Object[]{element.rawname});
   
           if (fCurrentElemDecl != null) {
  @@ -1904,7 +1905,7 @@
                   fAppendBuffer = true;
               }
               // if the type is simple, we need to append
  -            else if (fCurrentType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE) {
  +            else if (fCurrentType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
                   fAppendBuffer = true;
               }
               else {
  @@ -1930,9 +1931,9 @@
   
           // Element Locally Valid (Type)
           // 2 Its {abstract} must be false.
  -        if (fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +        if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
               XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
  -            if (ctype.getIsAbstract()) {
  +            if (ctype.getAbstract()) {
                   reportSchemaError("cvc-type.2", new Object[]{"Element " + element.rawname + " is declared with a type that is abstract.  Use xsi:type to specify a non-abstract type"});
               }
               if (fNormalizeData) {
  @@ -1968,7 +1969,7 @@
   
           // then try to get the content model
           fCurrentCM = null;
  -        if (fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +        if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
               fCurrentCM = ((XSComplexTypeDecl)fCurrentType).getContentModel(fCMBuilder);
           }
   
  @@ -1986,7 +1987,7 @@
           // now validate everything related with the attributes
           // first, get the attribute group
           XSAttributeGroupDecl attrGrp = null;
  -        if (fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +        if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
               XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
               attrGrp = ctype.getAttrGrp();
           }
  @@ -2354,7 +2355,7 @@
   
       }//findSchemaGrammar
   
  -    XSTypeDecl getAndCheckXsiType(QName element, String xsiType, XMLAttributes attributes) {
  +    XSTypeDefinition getAndCheckXsiType(QName element, String xsiType, XMLAttributes attributes) {
           // This method also deals with clause 1.2.1.2 of the constraint
           // Validation Rule: Schema-Validity Assessment (Element)
   
  @@ -2372,7 +2373,7 @@
           }
   
           // 4.2 The local name and namespace name (as defined in QName Interpretation (3.15.3)), of the actual value of that attribute information item must resolve to a type definition, as defined in QName resolution (Instance) (3.15.4)
  -        XSTypeDecl type = null;
  +        XSTypeDefinition type = null;
           // if the namespace is schema namespace, first try built-in types
           if (typeName.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA) {
               type = SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(typeName.localpart);
  @@ -2396,7 +2397,7 @@
           if (fCurrentType != null) {
               // 4.3 The local type definition must be validly derived from the {type definition} given the union of the {disallowed substitutions} and the {type definition}'s {prohibited substitutions}, as defined in Type Derivation OK (Complex) (3.4.6) (if it is a complex type definition), or given {disallowed substitutions} as defined in Type Derivation OK (Simple) (3.14.6) (if it is a simple type definition).
               short block = fCurrentElemDecl.fBlock;
  -            if (fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE)
  +            if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
                   block |= ((XSComplexTypeDecl)fCurrentType).fBlock;
               if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block))
                   reportSchemaError("cvc-elt.4.3", new Object[]{element.rawname, xsiType});
  @@ -2409,7 +2410,7 @@
           // Element Locally Valid (Element)
           // 3 The appropriate case among the following must be true:
           // 3.1 If {nillable} is false, then there must be no attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is nil.
  -        if (fCurrentElemDecl != null && !fCurrentElemDecl.getIsNillable()) {
  +        if (fCurrentElemDecl != null && !fCurrentElemDecl.getNillable()) {
               reportSchemaError("cvc-elt.3.1", new Object[]{element.rawname, SchemaSymbols.URI_XSI+","+SchemaSymbols.XSI_NIL});
           }
           // 3.2 If {nillable} is true and there is such an attribute information item and its actual value is true , then all of the following must be true:
  @@ -2444,7 +2445,7 @@
           AttributePSVImpl attrPSVI = null;
   
           boolean isSimple = fCurrentType == null ||
  -                           fCurrentType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE;
  +                           fCurrentType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE;
           
           XSObjectList attrUses = null;
           int useCount = 0;
  @@ -2516,7 +2517,7 @@
               // it's not xmlns, and not xsi, then we need to find a decl for it
               XSAttributeUseImpl currUse = null, oneUse;
               for (int i = 0; i < useCount; i++) {
  -                oneUse = (XSAttributeUseImpl)attrUses.getItem(i);
  +                oneUse = (XSAttributeUseImpl)attrUses.item(i);
                   if (oneUse.fAttrDecl.fName == fTempQName.localpart &&
                       oneUse.fAttrDecl.fTargetNamespace == fTempQName.uri) {
                       currUse = oneUse;
  @@ -2570,7 +2571,7 @@
                   else {
                       // 5 Let [Definition:]  the wild IDs be the set of all attribute information item to which clause 3.2 applied and whose validation resulted in a context-determined declaration of mustFind or no context-determined declaration at all, and whose [local name] and [namespace name] resolve (as defined by QName resolution (Instance) (3.15.4)) to an attribute declaration whose {type definition} is or is derived from ID. Then all of the following must be true:
                       // 5.1 There must be no more than one item in wild IDs.
  -                    if (currDecl.fType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE &&
  +                    if (currDecl.fType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE &&
                           ((XSSimpleType)currDecl.fType).isIDType()) {
                           if (wildcardIDName != null){
                               reportSchemaError("cvc-complex-type.5.1", new Object[]{element.rawname, currDecl.fName, wildcardIDName});
  @@ -2709,7 +2710,7 @@
           // for each attribute use
           for (int i = 0; i < useCount; i++) {
   
  -            currUse = (XSAttributeUseImpl)attrUses.getItem(i);
  +            currUse = (XSAttributeUseImpl)attrUses.item(i);
               currDecl = currUse.fAttrDecl;
               // get value constraint
               constType = currUse.fConstraintType;
  @@ -2832,7 +2833,7 @@
                   if (fSubElement)
                       reportSchemaError("cvc-elt.5.2.2.1", new Object[]{element.rawname});
                   // 5.2.2.2 The appropriate case among the following must be true:
  -                if (fCurrentType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +                if (fCurrentType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                       XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
                       // 5.2.2.2.1 If the {content type} of the actual type definition is mixed, then the initial value of the item must match the canonical lexical representation of the {value constraint} value.
                       if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_MIXED) {
  @@ -2847,7 +2848,7 @@
                               reportSchemaError("cvc-elt.5.2.2.2.2", new Object[]{element.rawname, content, fCurrentElemDecl.fDefault.stringValue()});
                       }
                   }
  -                else if (fCurrentType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE) {
  +                else if (fCurrentType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
                       XSSimpleType sType = (XSSimpleType)fCurrentType;
                       if (actualValue != null &&
                           !actualValue.equals(fCurrentElemDecl.fDefault.actualValue))
  @@ -2885,7 +2886,7 @@
           // Element Locally Valid (Type)
           // 3 The appropriate case among the following must be true:
           // 3.1 If the type definition is a simple type definition, then all of the following must be true:
  -        if (fCurrentType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE) {
  +        if (fCurrentType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
               // 3.1.2 The element information item must have no element information item [children].
               if (fSubElement)
                   reportSchemaError("cvc-type.3.1.2", new Object[]{element.rawname});
  
  
  
  1.11      +9 -1      xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeDecl.java
  
  Index: XSAttributeDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeDecl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XSAttributeDecl.java	18 Nov 2002 23:11:54 -0000	1.10
  +++ XSAttributeDecl.java	14 Jan 2003 20:21:45 -0000	1.11
  @@ -192,4 +192,12 @@
       public ValidatedInfo getValInfo() {
           return fDefault;
       }
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class XSAttributeDecl
  
  
  
  1.12      +16 -3     xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
  
  Index: XSAttributeGroupDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XSAttributeGroupDecl.java	9 Dec 2002 22:08:46 -0000	1.11
  +++ XSAttributeGroupDecl.java	14 Jan 2003 20:21:45 -0000	1.12
  @@ -57,9 +57,14 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
  -import org.apache.xerces.impl.xs.util.XSObjectListImpl;
   import org.apache.xerces.impl.dv.ValidatedInfo;
  +import org.apache.xerces.impl.xs.psvi.XSAnnotation;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeGroupDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSWildcard;
  +import org.apache.xerces.impl.xs.util.XSObjectListImpl;
   
   /**
    * The XML representation for an attribute group declaration
  @@ -356,4 +361,12 @@
           return null;
       }
       
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        //REVISIT: implement
  +		return null;
  +	}
  +
   } // class XSAttributeGroupDecl
  
  
  
  1.3       +13 -3     xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeUseImpl.java
  
  Index: XSAttributeUseImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeUseImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSAttributeUseImpl.java	18 Nov 2002 23:11:54 -0000	1.2
  +++ XSAttributeUseImpl.java	14 Jan 2003 20:21:45 -0000	1.3
  @@ -57,8 +57,11 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
   import org.apache.xerces.impl.dv.ValidatedInfo;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeUse;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
   
   /**
    * The XML representation for an attribute use
  @@ -114,7 +117,7 @@
        * requires an appropriate attribute information item to be present, or
        * merely allows it.
        */
  -    public boolean getIsRequired() {
  +    public boolean getRequired() {
           return fUse == SchemaSymbols.USE_REQUIRED;
       }
   
  @@ -143,5 +146,12 @@
                  null :
                  fDefault.actualValue.toString();
       }
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +		return null;
  +	}
   
   } // class XSAttributeUseImpl
  
  
  
  1.13      +23 -15    xml-xerces/java/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java
  
  Index: XSComplexTypeDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XSComplexTypeDecl.java	6 Jan 2003 23:01:02 -0000	1.12
  +++ XSComplexTypeDecl.java	14 Jan 2003 20:21:45 -0000	1.13
  @@ -70,7 +70,7 @@
    * @author Sandy Gao, IBM
    * @version $Id$
    */
  -public class XSComplexTypeDecl implements XSTypeDecl, XSComplexTypeDefinition {
  +public class XSComplexTypeDecl implements XSComplexTypeDefinition {
   
       // name of the complexType
       String fName = null;
  @@ -79,7 +79,7 @@
       String fTargetNamespace = null;
   
       // base type of the complexType
  -    XSTypeDecl fBaseType = null;
  +    XSTypeDefinition fBaseType = null;
   
       // derivation method of the complexType
       short fDerivedBy = XSConstants.DERIVATION_RESTRICTION;
  @@ -114,7 +114,7 @@
       }
   
       public void setValues(String name, String targetNamespace,
  -            XSTypeDecl baseType, short derivedBy, short schemaFinal, 
  +            XSTypeDefinition baseType, short derivedBy, short schemaFinal, 
               short block, short contentType,
               boolean isAbstract, XSAttributeGroupDecl attrGrp, 
               XSSimpleType simpleType, XSParticleDecl particle) {
  @@ -201,7 +201,7 @@
               str.append(" base type name='" + fBaseType.getName() + "', ");
   
           str.append(" content type='" + contentType[fContentType] + "', ");
  -        str.append(" isAbstract='" + getIsAbstract() + "', ");
  +        str.append(" isAbstract='" + getAbstract() + "', ");
           str.append(" hasTypeId='" + containsTypeID() + "', ");
           str.append(" final='" + fFinal + "', ");
           str.append(" block='" + fBlock + "', ");
  @@ -211,7 +211,7 @@
   
       }
   
  -    public boolean derivedFrom(XSTypeDefinition ancestor) {
  +    public boolean derivedFromType(XSTypeDefinition ancestor, short derivationMethod) {
           // ancestor is null, retur false
           if (ancestor == null)
               return false;
  @@ -220,7 +220,7 @@
               return true;
           // recursively get base, and compare it with ancestor
           XSTypeDefinition type = this;
  -        while (type != ancestor &&                      // compare with ancestor
  +        while (type != ancestor &&                     // compare with ancestor
                  type != SchemaGrammar.fAnySimpleType &&  // reached anySimpleType
                  type != SchemaGrammar.fAnyType) {        // reached anyType
               type = type.getBaseType();
  @@ -229,7 +229,7 @@
           return type == ancestor;
       }
   
  -    public boolean derivedFrom(String ancestorNS, String ancestorName) {
  +    public boolean derivedFrom(String ancestorNS, String ancestorName, short derivationMethod) {
           // ancestor is null, retur false
           if (ancestorName == null)
               return false;
  @@ -241,13 +241,13 @@
           }
   
           // recursively get base, and compare it with ancestor
  -        XSTypeDecl type = this;
  +        XSTypeDefinition type = this;
           while (!(ancestorName.equals(type.getName()) &&
                    ((ancestorNS == null && type.getNamespace() == null) ||
                     (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) &&   // compare with ancestor
                  type != SchemaGrammar.fAnySimpleType &&  // reached anySimpleType
                  type != SchemaGrammar.fAnyType) {        // reached anyType
  -            type = (XSTypeDecl)type.getBaseType();
  +            type = (XSTypeDefinition)type.getBaseType();
           }
   
           return type != SchemaGrammar.fAnySimpleType &&
  @@ -284,7 +284,7 @@
        * <code>XSObject</code> type.
        */
       public String getName() {
  -        return getIsAnonymous() ? null : fName;
  +        return getAnonymous() ? null : fName;
       }
   
       /**
  @@ -292,7 +292,7 @@
        * Convenience attribute. This is a field is not part of
        * XML Schema component model.
        */
  -    public boolean getIsAnonymous() {
  +    public boolean getAnonymous() {
           return((fMiscFlags & CT_IS_ANONYMOUS) != 0);
       }
   
  @@ -329,7 +329,7 @@
        *   (defined in <code>XSConstants</code>).
        * @return True if derivation is in the final set, otherwise false.
        */
  -    public boolean getIsFinal(short derivation) {
  +    public boolean isFinal(short derivation) {
           return (fFinal & derivation) != 0;
       }
   
  @@ -349,7 +349,7 @@
        * not be used as the {type definition} for the validation of element
        * information items.
        */
  -    public boolean getIsAbstract() {
  +    public boolean getAbstract() {
           return((fMiscFlags & CT_IS_ABSTRACT) != 0);
       }
   
  @@ -399,7 +399,7 @@
        * @return True if prohibited is a prohibited substitution, otherwise
        *   false.
        */
  -    public boolean getIsProhibitedSubstitution(short prohibited) {
  +    public boolean isProhibitedSubstitution(short prohibited) {
           return (fBlock & prohibited) != 0;
       }
   
  @@ -420,4 +420,12 @@
           return null;
       }
       
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class XSComplexTypeDecl
  
  
  
  1.29      +19 -18    xml-xerces/java/src/org/apache/xerces/impl/xs/XSConstraints.java
  
  Index: XSConstraints.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSConstraints.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XSConstraints.java	9 Dec 2002 22:08:46 -0000	1.28
  +++ XSConstraints.java	14 Jan 2003 20:21:45 -0000	1.29
  @@ -66,6 +66,7 @@
   import org.apache.xerces.impl.xs.util.SimpleLocator;
   import org.apache.xerces.impl.xs.psvi.XSConstants;
   import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.impl.dv.ValidationContext;
   import org.apache.xerces.util.SymbolHash;
   import java.util.Vector;
  @@ -84,9 +85,9 @@
   
       /**
        * check whether derived is valid derived from base, given a subset
  -     * of {restriction, extension}.
  +     * of {restriction, extension}.B
        */
  -    public static boolean checkTypeDerivationOk(XSTypeDecl derived, XSTypeDecl base, short block) {
  +    public static boolean checkTypeDerivationOk(XSTypeDefinition derived, XSTypeDefinition base, short block) {
           // if derived is anyType, then it's valid only if base is anyType too
           if (derived == SchemaGrammar.fAnyType)
               return derived == base;
  @@ -98,9 +99,9 @@
           }
   
           // if derived is simple type
  -        if (derived.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE) {
  +        if (derived.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
               // if base is complex type
  -            if (base.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +            if (base.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                   // if base is anyType, change base to anySimpleType,
                   // otherwise, not valid
                   if (base == SchemaGrammar.fAnyType)
  @@ -119,7 +120,7 @@
        * check whether simple type derived is valid derived from base,
        * given a subset of {restriction, extension}.
        */
  -    public static boolean checkSimpleDerivationOk(XSSimpleType derived, XSTypeDecl base, short block) {
  +    public static boolean checkSimpleDerivationOk(XSSimpleType derived, XSTypeDefinition base, short block) {
           // if derived is anySimpleType, then it's valid only if the base
           // is ur-type
           if (derived == SchemaGrammar.fAnySimpleType) {
  @@ -128,7 +129,7 @@
           }
   
           // if base is complex type
  -        if (base.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +        if (base.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
               // if base is anyType, change base to anySimpleType,
               // otherwise, not valid
               if (base == SchemaGrammar.fAnyType)
  @@ -144,7 +145,7 @@
        * check whether complex type derived is valid derived from base,
        * given a subset of {restriction, extension}.
        */
  -    public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDecl base, short block) {
  +    public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {
           // if derived is anyType, then it's valid only if base is anyType too
           if (derived == SchemaGrammar.fAnyType)
               return derived == base;
  @@ -192,7 +193,7 @@
               XSObjectList subUnionMemberDV = base.getMemberTypes();
               int subUnionSize = subUnionMemberDV.getLength();
               for (int i=0; i<subUnionSize; i++) {
  -                base = (XSSimpleType)subUnionMemberDV.getItem(i);
  +                base = (XSSimpleType)subUnionMemberDV.item(i);
                   if (checkSimpleDerivation(derived, base, block))
                       return true;
               }
  @@ -206,7 +207,7 @@
        *       anyType. Another method will be introduced for public use,
        *       which will call this method.
        */
  -    private static boolean checkComplexDerivation(XSComplexTypeDecl derived, XSTypeDecl base, short block) {
  +    private static boolean checkComplexDerivation(XSComplexTypeDecl derived, XSTypeDefinition base, short block) {
           // 2.1 B and D must be the same type definition.
           if (derived == base)
               return true;
  @@ -216,7 +217,7 @@
               return false;
   
           // 2 One of the following must be true:
  -        XSTypeDecl directBase = derived.fBaseType;
  +        XSTypeDefinition directBase = derived.fBaseType;
           // 2.2 B must be D's {base type definition}.
           if (directBase == base)
               return true;
  @@ -230,13 +231,13 @@
   
           // 2.3.2 The appropriate case among the following must be true:
           // 2.3.2.1 If D's {base type definition} is complex, then it must be validly derived from B given the subset as defined by this constraint.
  -        if (directBase.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE)
  +        if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
               return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);
   
           // 2.3.2.2 If D's {base type definition} is simple, then it must be validly derived from B given the subset as defined in Type Derivation OK (Simple) (3.14.6).
  -        if (directBase.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE) {
  +        if (directBase.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
               // if base is complex type
  -            if (base.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +            if (base.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                   // if base is anyType, change base to anySimpleType,
                   // otherwise, not valid
                   if (base == SchemaGrammar.fAnyType)
  @@ -256,14 +257,14 @@
        * returns the compiled form of the value
        * The parameter value could be either a String or a ValidatedInfo object
        */
  -    public static Object ElementDefaultValidImmediate(XSTypeDecl type, Object value, ValidationContext context, ValidatedInfo vinfo) {
  +    public static Object ElementDefaultValidImmediate(XSTypeDefinition type, Object value, ValidationContext context, ValidatedInfo vinfo) {
   
           XSSimpleType dv = null;
   
           // e-props-correct
           // For a string to be a valid default with respect to a type definition the appropriate case among the following must be true:
           // 1 If the type definition is a simple type definition, then the string must be valid with respect to that definition as defined by String Valid (3.14.4).
  -        if (type.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE) {
  +        if (type.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE) {
               dv = (XSSimpleType)type;
           }
   
  @@ -1029,7 +1030,7 @@
         //
         // Check nillable
         //
  -      if (! (bElement.getIsNillable() || !dElement.getIsNillable())) {
  +      if (! (bElement.getNillable() || !dElement.getNillable())) {
           throw new XMLSchemaException("rcase-NameAndTypeOK.2",
                                         new Object[]{dElement.fName});
         }
  @@ -1054,7 +1055,7 @@
   
            // get simple type
            boolean isSimple = false;
  -         if (dElement.fType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE ||
  +         if (dElement.fType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE ||
                ((XSComplexTypeDecl)dElement.fType).fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
                isSimple = true;
            }
  
  
  
  1.11      +24 -9     xml-xerces/java/src/org/apache/xerces/impl/xs/XSElementDecl.java
  
  Index: XSElementDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSElementDecl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XSElementDecl.java	18 Nov 2002 23:11:54 -0000	1.10
  +++ XSElementDecl.java	14 Jan 2003 20:21:45 -0000	1.11
  @@ -57,10 +57,16 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
  -import org.apache.xerces.impl.xs.util.XSNamedMapImpl;
  -import org.apache.xerces.impl.xs.identity.IdentityConstraint;
   import org.apache.xerces.impl.dv.ValidatedInfo;
  +import org.apache.xerces.impl.xs.identity.IdentityConstraint;
  +import org.apache.xerces.impl.xs.psvi.XSAnnotation;
  +import org.apache.xerces.impl.xs.psvi.XSComplexTypeDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSElementDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSNamedMap;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
  +import org.apache.xerces.impl.xs.util.XSNamedMapImpl;
   
   /**
    * The XML representation for an element declaration
  @@ -82,7 +88,7 @@
       // target namespace of the element
       public String fTargetNamespace = null;
       // type of the element
  -    public XSTypeDecl fType = null;
  +    public XSTypeDefinition fType = null;
       // misc flag of the element: nillable/abstract/fixed
       short fMiscFlags = 0;
       public short fScope = XSConstants.SCOPE_ABSENT;
  @@ -281,7 +287,7 @@
        * (see xsi:nil (2.6.2)) even if it has no text or element content
        * despite a {content type} which would otherwise require content.
        */
  -    public boolean getIsNillable() {
  +    public boolean getNillable() {
           return ((fMiscFlags & NILLABLE) != 0);
       }
   
  @@ -308,7 +314,7 @@
        * @return True if <code>exclusion</code> is a part of the substitution
        *   group exclusion subset.
        */
  -    public boolean getIsSubstitutionGroupExclusion(short exclusion) {
  +    public boolean isSubstitutionGroupExclusion(short exclusion) {
           return (fFinal & exclusion) != 0;
       }
   
  @@ -332,7 +338,7 @@
        * @return True if <code>disallowed</code> is a part of the substitution
        *   group exclusion subset.
        */
  -    public boolean getIsDisallowedSubstition(short disallowed) {
  +    public boolean isDisallowedSubstitution(short disallowed) {
           return (fBlock & disallowed) != 0;
       }
   
  @@ -348,7 +354,7 @@
       /**
        * {abstract} A boolean.
        */
  -    public boolean getIsAbstract() {
  +    public boolean getAbstract() {
           return ((fMiscFlags & ABSTRACT) != 0);
       }
   
  @@ -360,4 +366,13 @@
           return null;
       }
       
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class XMLElementDecl
  
  
  
  1.6       +9 -1      xml-xerces/java/src/org/apache/xerces/impl/xs/XSGroupDecl.java
  
  Index: XSGroupDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSGroupDecl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSGroupDecl.java	16 May 2002 18:25:54 -0000	1.5
  +++ XSGroupDecl.java	14 Jan 2003 20:21:45 -0000	1.6
  @@ -114,4 +114,12 @@
           return null;
       }
       
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class XSGroupDecl
  
  
  
  1.2       +8 -1      xml-xerces/java/src/org/apache/xerces/impl/xs/XSModelGroupImpl.java
  
  Index: XSModelGroupImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSModelGroupImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSModelGroupImpl.java	16 May 2002 18:25:54 -0000	1.1
  +++ XSModelGroupImpl.java	14 Jan 2003 20:21:45 -0000	1.2
  @@ -255,4 +255,11 @@
           return null;
       }
   
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +		return null;
  +	}
  +
   } // class XSParticle
  
  
  
  1.6       +47 -25    xml-xerces/java/src/org/apache/xerces/impl/xs/XSModelImpl.java
  
  Index: XSModelImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSModelImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSModelImpl.java	30 Aug 2002 02:53:04 -0000	1.5
  +++ XSModelImpl.java	14 Jan 2003 20:21:45 -0000	1.6
  @@ -57,13 +57,44 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
  +import java.util.Vector;
  +
  +import org.apache.xerces.impl.xs.psvi.StringList;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSAttributeGroupDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSElementDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSModel;
  +import org.apache.xerces.impl.xs.psvi.XSModelGroupDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSNamedMap;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItemList;
  +import org.apache.xerces.impl.xs.psvi.XSNotationDeclaration;
  +import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
  +import org.apache.xerces.impl.xs.util.NSItemListImpl;
  +import org.apache.xerces.impl.xs.util.StringListImpl;
  +import org.apache.xerces.impl.xs.util.XSNamedMap4Types;
  +import org.apache.xerces.impl.xs.util.XSNamedMapImpl;
   import org.apache.xerces.util.SymbolHash;
   import org.apache.xerces.util.XMLSymbols;
  -import org.apache.xerces.impl.xs.util.*;
  -import java.util.Vector;
   
   /**
  + * @author elitani
  + *
  + * To change this generated comment edit the template variable "typecomment":
  + * Window>Preferences>Java>Templates.
  + * To enable and disable the creation of type comments go to
  + * Window>Preferences>Java>Code Generation.
  + */
  +/**
  + * @author elitani
  + *
  + * To change this generated comment edit the template variable "typecomment":
  + * Window>Preferences>Java>Templates.
  + * To enable and disable the creation of type comments go to
  + * Window>Preferences>Java>Code Generation.
  + */
  +/**
    * Implements XSModel:  a read-only interface that represents an XML Schema,
    * which could be components from different namespaces.
    *
  @@ -183,17 +214,11 @@
           return new StringListImpl(fNamespaces, fGrammarCount);
       }
   
  -    /**
  -     * Convenience method. Returns a list of all [namespace schema information
  -     * item]s. There is one such item for each namespace (including the null
  -     * namespace). Enties of the returned enumeration are instances of
  -     * XSNamespaceItem interface.
  -     * @return A list of namespace items that belong to this schema.
  -     */
  -    public ObjectList getNamespaceItems() {
   
  -        // REVISIT: should the type of fGrammarList be ObjectListImpl?
  -        return new ObjectListImpl(fGrammarList, fGrammarCount);
  +    public XSNamespaceItemList getNamespaceItems() {
  +
  +        // REVISIT: should the type of fGrammarList be NSItemListImpl?
  +        return new NSItemListImpl(fGrammarList, fGrammarCount);
       }
   
       /**
  @@ -341,7 +366,7 @@
        * @return A top-level attribute declaration or null if such declaration
        *   does not exist.
        */
  -    public XSAttributeDeclaration getAttributeDecl(String name,
  +    public XSAttributeDeclaration getAttributeDeclaration(String name,
                                                      String namespace) {
           SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
           if (sg == null)
  @@ -356,7 +381,7 @@
        * @return A top-level element declaration or null if such declaration
        *   does not exist.
        */
  -    public XSElementDeclaration getElementDecl(String name,
  +    public XSElementDeclaration getElementDeclaration(String name,
                                                  String namespace) {
           SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
           if (sg == null)
  @@ -395,15 +420,11 @@
           return (XSModelGroupDefinition)sg.fGlobalGroupDecls.get(name);
       }
   
  -    /**
  -     * Convenience method. Returns a top-level notation declaration.
  -     *
  -     * @param name      The name of the declaration.
  -     * @param namespace The namespace of the definition, otherwise null.
  -     * @return A top-level notation declaration or null if such declaration
  -     *         does not exist.
  -     */
  -    public XSNotationDeclaration getNotationDecl(String name,
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSModel#getNotationDeclaration(String, String)
  +	 */
  +    public XSNotationDeclaration getNotationDeclaration(String name,
                                                    String namespace) {
           SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
           if (sg == null)
  @@ -423,4 +444,5 @@
           return str == null ? XMLSymbols.EMPTY_STRING : str;
       }
       
  +
   } // class XSModelImpl
  
  
  
  1.4       +12 -2     xml-xerces/java/src/org/apache/xerces/impl/xs/XSNotationDecl.java
  
  Index: XSNotationDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSNotationDecl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSNotationDecl.java	16 May 2002 18:25:54 -0000	1.3
  +++ XSNotationDecl.java	14 Jan 2003 20:21:45 -0000	1.4
  @@ -57,7 +57,10 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
  +import org.apache.xerces.impl.xs.psvi.XSAnnotation;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSNotationDeclaration;
   
   /**
    * The XML representation for a NOTATION declaration
  @@ -123,5 +126,12 @@
           // REVISIT: SCAPI: to implement
           return null;
       }
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +		return null;
  +	}
   
   } // class XSNotationDecl
  
  
  
  1.9       +13 -3     xml-xerces/java/src/org/apache/xerces/impl/xs/XSParticleDecl.java
  
  Index: XSParticleDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSParticleDecl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSParticleDecl.java	16 May 2002 18:25:54 -0000	1.8
  +++ XSParticleDecl.java	14 Jan 2003 20:21:45 -0000	1.9
  @@ -57,7 +57,10 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSParticle;
  +import org.apache.xerces.impl.xs.psvi.XSTerm;
   
   /**
    * Store schema particle declaration.
  @@ -231,7 +234,7 @@
       /**
        * {max occurs} whether the maxOccurs value is unbounded.
        */
  -    public boolean getIsMaxOccursUnbounded() {
  +    public boolean getMaxOccursUnbounded() {
           return fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED;
       }
   
  @@ -248,5 +251,12 @@
       public XSTerm getTerm() {
           return fValue;
       }
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +		return null;
  +	}
   
   } // class XSParticle
  
  
  
  1.10      +17 -6     xml-xerces/java/src/org/apache/xerces/impl/xs/XSWildcardDecl.java
  
  Index: XSWildcardDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSWildcardDecl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XSWildcardDecl.java	9 Dec 2002 22:08:46 -0000	1.9
  +++ XSWildcardDecl.java	14 Jan 2003 20:21:45 -0000	1.10
  @@ -57,10 +57,12 @@
   
   package org.apache.xerces.impl.xs;
   
  -import org.apache.xerces.impl.xs.psvi.*;
  +import org.apache.xerces.impl.xs.psvi.StringList;
  +import org.apache.xerces.impl.xs.psvi.XSAnnotation;
  +import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  +import org.apache.xerces.impl.xs.psvi.XSWildcard;
   import org.apache.xerces.impl.xs.util.StringListImpl;
  -import org.apache.xerces.xni.QName;
  -import java.util.Enumeration;
   
   /**
    * The XML representation for a wildcard declaration
  @@ -577,7 +579,7 @@
        * <code>constraintType</code> NOT_NSCONSTRAINT, the list contains
        * disallowed namespaces.
        */
  -    public StringList getNSConstraintList() {
  +    public StringList getNsConstraintList() {
           return new StringListImpl(fNamespaceList, fNamespaceList.length);
       }
   
  @@ -596,5 +598,14 @@
           // REVISIT: SCAPI: to implement
           return null;
       }
  -    
  +
  +
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class XSWildcardDecl
  
  
  
  1.9       +7 -12     xml-xerces/java/src/org/apache/xerces/impl/xs/identity/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/identity/Field.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Field.java	16 Sep 2002 18:26:11 -0000	1.8
  +++ Field.java	14 Jan 2003 20:21:46 -0000	1.9
  @@ -58,17 +58,12 @@
   package org.apache.xerces.impl.xs.identity;
   
   import org.apache.xerces.impl.dv.XSSimpleType;
  -import org.apache.xerces.impl.xpath.*;
  -import org.apache.xerces.impl.xs.XSElementDecl;
  -import org.apache.xerces.impl.xs.SchemaGrammar;
  -import org.apache.xerces.impl.xs.SchemaSymbols;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
  +import org.apache.xerces.impl.xpath.XPathException;
   import org.apache.xerces.impl.xs.XSComplexTypeDecl;
  +import org.apache.xerces.impl.xs.XSElementDecl;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.util.SymbolTable;
   import org.apache.xerces.xni.NamespaceContext;
  -import org.apache.xerces.xni.psvi.ElementPSVI;
  -
  -import org.xml.sax.SAXException;
   
   /**
    * Schema identity constraint field.
  @@ -233,9 +228,9 @@
               XSSimpleType val=null;
   
               if (eDecl!=null) {
  -                XSTypeDecl type = eDecl.fType;
  +                XSTypeDefinition type = eDecl.fType;
                   if (type != null) {
  -                    if (type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +                    if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                           XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;
                           val = (XSSimpleType)ctype.getSimpleType();
                       }
  @@ -254,7 +249,7 @@
               }
               fMatchedString = value;
               if(eDecl != null) {
  -                matched(fMatchedString, val, (eDecl.getIsNillable()));
  +                matched(fMatchedString, val, (eDecl.getNillable()));
               } else {
                   matched(fMatchedString, val, false); 
               }
  
  
  
  1.6       +11 -3     xml-xerces/java/src/org/apache/xerces/impl/xs/identity/IdentityConstraint.java
  
  Index: IdentityConstraint.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/identity/IdentityConstraint.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IdentityConstraint.java	17 Jun 2002 18:41:46 -0000	1.5
  +++ IdentityConstraint.java	14 Jan 2003 20:21:46 -0000	1.6
  @@ -66,7 +66,7 @@
    * @author Andy Clark, IBM
    * @version $Id$
    */
  -public abstract class IdentityConstraint implements XSIDConstraintDefinition {
  +public abstract class IdentityConstraint implements XSIDCDefinition {
   
       //
       // Data
  @@ -239,7 +239,7 @@
        * forbidden otherwise. An identity-constraint definition with
        * {identity-constraint category} equal to key or unique.
        */
  -    public XSIDConstraintDefinition getRefKey() {
  +    public XSIDCDefinition getRefKey() {
           return null;
       }
   
  @@ -251,4 +251,12 @@
           return null;
       }
       
  +	/**
  +	 * @see org.apache.xerces.impl.xs.psvi.XSObject#getNamespaceItem()
  +	 */
  +	public XSNamespaceItem getNamespaceItem() {
  +        // REVISIT: implement
  +		return null;
  +	}
  +
   } // class IdentityConstraint
  
  
  
  1.4       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/xs/identity/KeyRef.java
  
  Index: KeyRef.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/identity/KeyRef.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- KeyRef.java	16 May 2002 18:25:55 -0000	1.3
  +++ KeyRef.java	14 Jan 2003 20:21:46 -0000	1.4
  @@ -57,7 +57,7 @@
   
   package org.apache.xerces.impl.xs.identity;
   
  -import org.apache.xerces.impl.xs.psvi.XSIDConstraintDefinition;
  +import org.apache.xerces.impl.xs.psvi.XSIDCDefinition;
   
   /**
    * Schema key reference identity constraint.
  @@ -101,7 +101,7 @@
        * forbidden otherwise. An identity-constraint definition with
        * {identity-constraint category} equal to key or unique.
        */
  -    public XSIDConstraintDefinition getRefKey() {
  +    public XSIDCDefinition getRefKey() {
           return fKey;
       }
   
  
  
  
  1.14      +4 -4      xml-xerces/java/src/org/apache/xerces/impl/xs/identity/XPathMatcher.java
  
  Index: XPathMatcher.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/identity/XPathMatcher.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XPathMatcher.java	16 Sep 2002 18:26:11 -0000	1.13
  +++ XPathMatcher.java	14 Jan 2003 20:21:46 -0000	1.14
  @@ -61,8 +61,8 @@
   import org.apache.xerces.impl.xs.XSAttributeUseImpl;
   import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
   import org.apache.xerces.impl.xs.XSElementDecl;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
   import org.apache.xerces.impl.xs.XSComplexTypeDecl;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.impl.dv.XSSimpleType;
   import org.apache.xerces.impl.xs.SchemaGrammar;
   import org.apache.xerces.impl.xs.SchemaSymbols;
  @@ -385,9 +385,9 @@
                       // but is it right?
                       XSAttributeGroupDecl attrGrp = null;
                       if (elementDecl != null) {
  -                        XSTypeDecl type = elementDecl.fType;
  +                        XSTypeDefinition type = elementDecl.fType;
                           if (type != null) {
  -                          if (type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
  +                          if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
                               XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;
                               attrGrp = ctype.getAttrGrp();
                             }
  
  
  
  1.2       +15 -17    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/PSVIProvider.java
  
  Index: PSVIProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/PSVIProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PSVIProvider.java	19 Jul 2002 18:56:14 -0000	1.1
  +++ PSVIProvider.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,30 +49,26 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.xerces.impl.xs.psvi;
   
   import org.apache.xerces.xni.psvi.AttributePSVI;
   import org.apache.xerces.xni.psvi.ElementPSVI;
   
   /**
  - * This interface provides an access to the post schema validation infoset for an
  - * API that provides streaming document infoset, such as SAX, XNI, and
  - * others.
  - * <p>For implementations that would like to provide access to the PSVI in a
  - * streaming model, a parser object should also implement
  - * <code>PSVIProvider</code> interface. Within the scope of the methods
  - * handling the start and end of an element, applications may use the
  - * <code>PSVIProvider</code> to retrieve the PSVI related to that element
  + * This interface provides access to the post schema validation infoset for an 
  + * API that provides streaming document infoset, such as SAX, XNI, and 
  + * others. 
  + * <p>For implementations that would like to provide access to the PSVI in a 
  + * streaming model, a parser object should also implement 
  + * <code>PSVIProvider</code> interface. Within the scope of the methods 
  + * handling the start and end of an element, applications may use the 
  + * <code>PSVIProvider</code> to retrieve the PSVI related to that element 
    * and its attributes.
  - * 
  - * @author Elena Litani, IBM
  - * @version $Id$
    */
   public interface PSVIProvider {
       /**
  @@ -90,12 +86,14 @@
        *   context}, {notation}. The {schema information} property is 
        *   available for the validation root. The {error codes} property is 
        *   available if any errors occured during validation.  The following 
  -     *   information are available in the scope of a document handler 
  +     *   properties are available in the scope of a document handler 
        *   <code>endElement</code>: {nil}, {schema specified}, {normalized 
        *   value},{ member type definition}, {validity}, {validation attempted}
        *   . If the declaration has a value constraint, the property {schema 
        *   default} is available. The {error codes} property is available if 
  -     *   any errors occured during validation. 
  +     *   any errors occured during validation. Note: some processors may 
  +     *   choose to provide all the PSVI properties in the scope of the 
  +     *   <code>endElement</code>. 
        */
       public ElementPSVI getElementPSVI();
   
  
  
  
  1.3       +10 -13    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/StringList.java
  
  Index: StringList.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/StringList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringList.java	9 Aug 2002 15:18:19 -0000	1.2
  +++ StringList.java	14 Jan 2003 20:21:46 -0000	1.3
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,24 +49,21 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
  -
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - *  The <code>StringList</code> is an ordered collection of strings. 
  - *
  - * @version $Id$
  + *  The <code>StringList</code> is an ordered collection of 
  + * <code>GenericString</code>. 
    */
   public interface StringList {
       /**
  -     *  The number of <code>String</code> in the list. The range of valid 
  -     * child object indices is 0 to <code>length-1</code> inclusive. 
  +     *  The number of <code>GenericString</code> in the list. The range of 
  +     * valid child object indices is 0 to <code>length-1</code> inclusive. 
        */
       public int getLength();
   
  @@ -75,9 +72,9 @@
        * starts at 0. If <code>index</code> is greater than or equal to the 
        * number of objects in the list, this returns <code>null</code>. 
        * @param index  index into the collection. 
  -     * @return  The <code>String</code>at the <code>index</code>th position 
  -     *   in the <code>StringList</code>, or <code>null</code> if that is 
  -     *   not a valid index. 
  +     * @return  The <code>GenericString</code> at the <code>index</code>th 
  +     *   position in the <code>StringList</code>, or <code>null</code> if 
  +     *   that is not a valid index. 
        */
       public String item(int index);
   
  
  
  
  1.2       +33 -12    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAnnotation.java
  
  Index: XSAnnotation.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAnnotation.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSAnnotation.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSAnnotation.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,30 +49,51 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.13.1 The Annotation Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Annotation schema component.
    */
   public interface XSAnnotation extends XSObject {
  +    // TargetType
  +    /**
  +     * The object type is <code>org.w3c.dom.Element</code>.
  +     */
  +    public static final short W3C_DOM_ELEMENT           = 1;
  +    /**
  +     * The object type is <code>org.w3c.dom.Document</code>.
  +     */
  +    public static final short SAX_CONTENTHANDLER        = 2;
  +    /**
  +     * The object type is <code>org.xml.sax.ContentHandler</code>.
  +     */
  +    public static final short W3C_DOM_DOCUMENT          = 3;
   
       /**
  -     * A text representation of annotation.
  +     *  Write contents of the annotation to the specified DOM object. If the 
  +     * specified <code>target</code> object is a DOM in-scope namespace 
  +     * declarations for <code>annotation</code> element are added as 
  +     * attributes nodes of the serialized <code>annotation</code>, otherwise 
  +     * the corresponding events for all in-scope namespace declaration are 
  +     * sent via specified document handler. 
  +     * @param target  A target pointer to the annotation target object, i.e. 
  +     *   <code>org.w3c.dom.Document</code>, 
  +     *   <code>org.xml.sax.ContentHandler</code>. 
  +     * @param targetType  A target type. 
  +     * @return If the <code>target</code> is recognized type and supported by 
  +     *   this implementation return true, otherwise return false. 
        */
  -    public String getAnnotationString();
  +    public boolean writeAnnotation(Object target, 
  +                                   short targetType);
   
       /**
  -     * Object representation of annotation.
  +     * A text representation of annotation.
        */
  -    public Object getAnnotationObject();
  +    public String getAnnotationString();
   
   }
  
  
  
  1.2       +14 -22    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAttributeDeclaration.java
  
  Index: XSAttributeDeclaration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAttributeDeclaration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSAttributeDeclaration.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSAttributeDeclaration.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,56 +49,48 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.2.1 The Attribute Declaration Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * The interfaces represents the Attribute Declaration schema component.
    */
   public interface XSAttributeDeclaration extends XSObject {
  -
       /**
  -     * A simple type definition
  +     * [type definition]: A simple type definition 
        */
       public XSSimpleTypeDefinition getTypeDefinition();
   
       /**
  -     * Optional. Either global or a complex type definition (
  -     * <code>ctDefinition</code>). This property is absent in the case of
  -     * declarations within attribute group definitions: their scope will be
  -     * determined when they are used in the construction of complex type
  -     * definitions.
  +     * Optional. One of <code>SCOPE_GLOBAL</code>, <code>SCOPE_LOCAL</code>, 
  +     * or <code>SCOPE_ABSENT</code>. If the scope is local, then the 
  +     * <code>enclosingCTDefinition</code> is present. 
        */
       public short getScope();
   
       /**
  -     * Locally scoped declarations are available for use only within the
  -     * complex type definition identified by the <code>scope</code>
  -     * property.
  +     * The complex type definition for locally scoped declarations (see 
  +     * <code>scope</code>). 
        */
       public XSComplexTypeDefinition getEnclosingCTDefinition();
   
       /**
  -     * Value constraint: one of default, fixed.
  +     * Value constraint: one of <code>VC_NONE, VC_DEFAULT, VC_FIXED</code>. 
        */
       public short getConstraintType();
   
       /**
  -     * Value constraint: The actual value (with respect to the {type
  -     * definition}) Should we return Object instead of DOMString?
  +     * Value constraint: The actual value with respect to the [type definition
  +     * ]. 
        */
       public String getConstraintValue();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. Annotation. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.2       +7 -12     xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAttributeGroupDefinition.java
  
  Index: XSAttributeGroupDefinition.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAttributeGroupDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSAttributeGroupDefinition.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSAttributeGroupDefinition.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,34 +49,29 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.6.1 The Attribute Group Definition Schema Component
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Attribute Group Definition schema component
    */
   public interface XSAttributeGroupDefinition extends XSObject {
  -
       /**
  -     * {attribute uses} A set of attribute uses.
  +     * A set of [attribute uses]. 
        */
       public XSObjectList getAttributeUses();
   
       /**
  -     * {attribute wildcard} Optional. A wildcard.
  +     * Optional. A [wildcard]. 
        */
       public XSWildcard getAttributeWildcard();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. An [annotation]. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.2       +12 -17    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAttributeUse.java
  
  Index: XSAttributeUse.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSAttributeUse.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSAttributeUse.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSAttributeUse.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,34 +58,29 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.5.1 The Attribute Use Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Attribute Use schema component. 
    */
   public interface XSAttributeUse extends XSObject {
  -
       /**
  -     * {required} determines whether this use of an attribute declaration
  -     * requires an appropriate attribute information item to be present, or
  -     * merely allows it.
  +     * [required]: determines whether this use of an attribute declaration 
  +     * requires an appropriate attribute information item to be present, or 
  +     * merely allows it. 
        */
  -    public boolean getIsRequired();
  +    public boolean getRequired();
   
       /**
  -     * {attribute declaration} provides the attribute declaration itself,
  -     * which will in turn determine the simple type definition used.
  +     * [attribute declaration]: provides the attribute declaration itself, 
  +     * which will in turn determine the simple type definition used. 
        */
       public XSAttributeDeclaration getAttrDeclaration();
   
       /**
  -     * Value Constraint: one of default, fixed.
  +     * Value Constraint: one of default, fixed. 
        */
       public short getConstraintType();
   
       /**
  -     * Value Constraint: The actual value (with respect to the {type
  -     * definition}).
  +     * Value Constraint: The actual value. 
        */
       public String getConstraintValue();
   
  
  
  
  1.2       +39 -40    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSComplexTypeDefinition.java
  
  Index: XSComplexTypeDefinition.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSComplexTypeDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSComplexTypeDefinition.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSComplexTypeDefinition.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,28 +58,25 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.4.1 The Complex Type Definition Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Complex Type Definition schema component.
    */
   public interface XSComplexTypeDefinition extends XSTypeDefinition {
  -
  +    // Content Model Types
       /**
  -     * Represents an empty content type. A content
  -     * type with the distinguished value empty validates elements with no
  -     * character or element information item children.
  +     * Represents an empty content type. A content type with the distinguished 
  +     * value empty validates elements with no character or element 
  +     * information item children. 
        */
       public static final short CONTENTTYPE_EMPTY         = 0;
       /**
  -     * The content model type simple. A content type which is a simple
  -     * validates elements with character-only children.
  +     * Represents a simple content type. A content type which is a simple 
  +     * validates elements with character-only children. 
        */
       public static final short CONTENTTYPE_SIMPLE        = 1;
       /**
  -     * Represents an element-only content type. An element-only content type
  -     * validates elements with children that conform to the supplied content
  -     * model.
  +     * Represents an element-only content type. An element-only content type 
  +     * validates elements with children that conform to the supplied content 
  +     * model. 
        */
       public static final short CONTENTTYPE_ELEMENT       = 2;
       /**
  @@ -88,65 +85,67 @@
       public static final short CONTENTTYPE_MIXED         = 3;
   
       /**
  -     * {derivation method} Either extension or restriction. The valid constant
  -     * value for this <code>XSConstants</code> EXTENTION, RESTRICTION.
  +     * [derivation method]: either <code>DERIVATION_EXTENSION</code>, 
  +     * <code>DERIVATION_RESTRICTION</code>, or <code>DERIVATION_NONE</code> 
  +     * (see <code>XSConstants</code>). 
        */
       public short getDerivationMethod();
   
       /**
  -     * {abstract} A boolean. Complex types for which {abstract} is true must
  -     * not be used as the {type definition} for the validation of element
  -     * information items.
  +     * [abstract]: a boolean. Complex types for which <code>abstract</code> is 
  +     * true must not be used as the type definition for the validation of 
  +     * element information items. 
        */
  -    public boolean getIsAbstract();
  +    public boolean getAbstract();
   
       /**
  -     *  {attribute uses} A set of attribute uses.
  +     *  A set of attribute uses. 
        */
       public XSObjectList getAttributeUses();
   
       /**
  -     * {attribute wildcard} Optional. A wildcard.
  +     * Optional.An attribute wildcard. 
        */
       public XSWildcard getAttributeWildcard();
   
       /**
  -     * {content type} One of empty, a simple type definition (see
  -     * <code>simpleType</code>, or mixed, element-only (see
  -     * <code>cmParticle</code>).
  +     * [content type]: one of empty (<code>CONTENTTYPE_EMPTY</code>), a simple 
  +     * type definition (<code>CONTENTTYPE_SIMPLE</code>), mixed (
  +     * <code>CONTENTTYPE_EMPTY</code>), or element-only (
  +     * <code>CONTENTTYPE_EMPTY</code>). 
        */
       public short getContentType();
   
       /**
  -     * A simple type definition corresponding to simple content model,
  -     * otherwise <code>null</code>
  +     * A simple type definition corresponding to simple content model, 
  +     * otherwise <code>null</code> 
        */
       public XSSimpleTypeDefinition getSimpleType();
   
       /**
  -     * A particle for mixed or element-only content model, otherwise
  -     * <code>null</code>
  +     * A particle for mixed or element-only content model, otherwise 
  +     * <code>null</code> 
        */
       public XSParticle getParticle();
   
       /**
  -     * {prohibited substitutions} A subset of {extension, restriction}.
  -     * @param prohibited  extention or restriction constants (defined in
  -     *   <code>XSConstants</code>).
  -     * @return True if prohibited is a prohibited substitution, otherwise
  +     * [prohibited substitutions]: a subset of {extension, restriction}
  +     * @param restriction  Extention or restriction constants (see 
  +     *   <code>XSConstants</code>). 
  +     * @return True if restriction is a prohibited substitution, otherwise 
        *   false.
        */
  -    public boolean getIsProhibitedSubstitution(short prohibited);
  +    public boolean isProhibitedSubstitution(short restriction);
   
       /**
  -     * {prohibited substitutions}
  -     *
  -     * @return A bit flag corresponding to prohibited substitutions
  +     *  [prohibited substitutions]: A subset of {extension, restriction} or 
  +     * <code>DERIVATION_NONE</code> represented as a bit flag (see 
  +     * <code>XSConstants</code>). 
        */
       public short getProhibitedSubstitutions();
   
       /**
  -     * {annotations} A set of annotations.
  +     * A set of [annotations]. 
        */
       public XSObjectList getAnnotations();
   
  
  
  
  1.2       +45 -49    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSConstants.java
  
  Index: XSConstants.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSConstants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSConstants.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSConstants.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,36 +58,32 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * This interface defines common constants for XML Schema APIs.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + *  This interface defines constants used by this specification.
    */
   public interface XSConstants {
  -
  -    // Various types of schema components
  +    // XML Schema Components
       /**
  -     * An attribute declaration <code>XSAttributeDecl</code>.
  +     * The object describes an attribute declaration.
        */
       public static final short ATTRIBUTE_DECLARATION     = 1;
       /**
  -     * An element declaration <code>XSElementDecl</code>.
  +     * The object describes an element declaration.
        */
       public static final short ELEMENT_DECLARATION       = 2;
       /**
  -     * A complex type definition
  +     * The object describes a complex type or simple type definition.
        */
       public static final short TYPE_DEFINITION           = 3;
       /**
  -     * An attribute use definition
  +     * The object describes an attribute use definition.
        */
       public static final short ATTRIBUTE_USE             = 4;
       /**
  -     * An attribute group
  +     * The object describes an attribute group definition.
        */
       public static final short ATTRIBUTE_GROUP           = 5;
       /**
  -     * A model group definition
  +     * The object describes a model group definition.
        */
       public static final short MODEL_GROUP_DEFINITION    = 6;
       /**
  @@ -95,15 +91,15 @@
        */
       public static final short MODEL_GROUP               = 7;
       /**
  -     * A particle.
  +     * The object describes a particle.
        */
       public static final short PARTICLE                  = 8;
       /**
  -     * A wildcard.
  +     * The object describes a wildcard.
        */
       public static final short WILDCARD                  = 9;
       /**
  -     * Identity constraint definition.
  +     * The object describes an identity constraint definition.
        */
       public static final short IDENTITY_CONSTRAINT       = 10;
       /**
  @@ -111,68 +107,68 @@
        */
       public static final short NOTATION_DECLARATION      = 11;
       /**
  -     * An annotation.
  +     * The object describes an annotation.
        */
       public static final short ANNOTATION                = 12;
   
  -    // Derivation methods (for block and final values)
  +    // Derivation constants
       /**
  -     * <code>XSTypeDefinition</code> final set or <code>XSElementDecl</code>
  -     * disallowed substitution group.
  +     * No constraint is available.
        */
       public static final short DERIVATION_NONE           = 0;
       /**
  -     * <code>XSTypeDefinition</code> final set or <code>XSElementDecl</code>
  -     * disallowed substitution group.
  +     * <code>XSTypeDefinition</code> final set or 
  +     * <code>XSElementDeclaration</code> disallowed substitution group.
        */
  -    public static final short DERIVATION_EXTENSION      = 1<<0;
  +    public static final short DERIVATION_EXTENSION      = 1;
       /**
  -     * <code>XSTypeDefinition</code> final set or <code>XSElementDecl</code>
  -     * disallowed substitution group.
  +     * <code>XSTypeDefinition</code> final set or 
  +     * <code>XSElementDeclaration</code> disallowed substitution group.
        */
  -    public static final short DERIVATION_RESTRICTION    = 1<<1;
  +    public static final short DERIVATION_RESTRICTION    = 2;
       /**
  -     * <code>XSTypeDefinition</code> final set
  +     * <code>XSTypeDefinition</code> final set.
        */
  -    public static final short DERIVATION_SUBSTITUTION   = 1<<2;
  +    public static final short DERIVATION_SUBSTITUTION   = 4;
       /**
        * <code>XSTypeDefinition</code> final set.
        */
  -    public static final short DERIVATION_UNION          = 1<<3;
  +    public static final short DERIVATION_UNION          = 8;
       /**
        * <code>XSTypeDefinition</code> final set.
        */
  -    public static final short DERIVATION_LIST           = 1<<4;
  +    public static final short DERIVATION_LIST           = 16;
   
  -    // Value constraint types
  +    // Scope
       /**
  -     * No value constraint
  +     * The scope of a declaration within named model groups or attribute 
  +     * groups is <code>absent</code>. The scope of such declaration is 
  +     * determined when it is used in the construction of complex type 
  +     * definitions. 
        */
  -    public static final short VC_NONE                   = 0;
  +    public static final short SCOPE_ABSENT              = 0;
       /**
  -     * Indicates that there is a default value constraint.
  +     * A scope of <code>global</code> identifies top-level declarations. 
        */
  -    public static final short VC_DEFAULT                = 1;
  +    public static final short SCOPE_GLOBAL              = 1;
       /**
  -     * Indicates that there is a fixed value constraint for this attribute.
  +     * <code>Locally scoped</code> declarations are available for use only 
  +     * within the complex type.
        */
  -    public static final short VC_FIXED                  = 2;
  +    public static final short SCOPE_LOCAL               = 2;
   
  -    // Scopes
  +    // Value Constraint
       /**
  -     * The scope has value of absent in the case of declarations within named
  -     * model groups or attribute groups: their scope is determined when they
  -     * are used in the construction of complex type definitions.
  +     * Indicates that the component does not have any value constraint.
        */
  -    public static final short SCOPE_ABSENT              = 0;
  +    public static final short VC_NONE                   = 0;
       /**
  -     * A {scope} of global identifies top-level declarations.
  +     * Indicates that there is a default value constraint.
        */
  -    public static final short SCOPE_GLOBAL              = 1;
  +    public static final short VC_DEFAULT                = 1;
       /**
  -     * Locally scoped declarations are available for use only within the
  -     * complex type identified by the {scope} property.
  +     * Indicates that there is a fixed value constraint for this attribute.
        */
  -    public static final short SCOPE_LOCAL               = 2;
  +    public static final short VC_FIXED                  = 2;
   
   }
  
  
  
  1.2       +59 -61    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSElementDeclaration.java
  
  Index: XSElementDeclaration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSElementDeclaration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSElementDeclaration.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSElementDeclaration.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,109 +58,107 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.3.1 The Element Declaration Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * The interfaces represents the Element Declaration schema component. 
    */
   public interface XSElementDeclaration extends XSTerm {
  -
       /**
  -     * Either a simple type definition or a complex type definition.
  +     * [type definition]: either a simple type definition or a complex type 
  +     * definition. 
        */
       public XSTypeDefinition getTypeDefinition();
   
       /**
  -     * Optional. Either global or a complex type definition (
  -     * <code>ctDefinition</code>). This property is absent in the case of
  -     * declarations within named model groups: their scope will be
  -     * determined when they are used in the construction of complex type
  -     * definitions.
  +     * Optional. One of <code>SCOPE_GLOBAL</code>, <code>SCOPE_LOCAL</code>, 
  +     * or <code>SCOPE_ABSENT</code>. If the scope is local, then the 
  +     * <code>enclosingCTDefinition</code> is present. 
        */
       public short getScope();
   
       /**
  -     * Locally scoped declarations are available for use only within the
  -     * complex type definition identified by the <code>scope</code>
  -     * property.
  +     * The complex type definition for locally scoped declarations (see 
  +     * <code>scope</code>). 
        */
       public XSComplexTypeDefinition getEnclosingCTDefinition();
   
       /**
  -     * A value constraint: one of default, fixed.
  +     * [Value constraint]: one of <code>VC_NONE, VC_DEFAULT, VC_FIXED</code>. 
        */
       public short getConstraintType();
   
       /**
  -     * A value constraint: The actual value (with respect to the {type
  -     * definition})
  +     * [Value constraint]: the actual value with respect to the [type 
  +     * definition]. 
        */
       public String getConstraintValue();
   
       /**
  -     * If {nillable} is true, then an element may also be valid if it carries
  -     * the namespace qualified attribute with [local name] nil from
  -     * namespace http://www.w3.org/2001/XMLSchema-instance and value true
  -     * (see xsi:nil (2.6.2)) even if it has no text or element content
  -     * despite a {content type} which would otherwise require content.
  +     *  If nillable is true, then an element may also be valid if it carries 
  +     * the namespace qualified attribute with local name <code>nil</code> 
  +     * from namespace <code>http://www.w3.org/2001/XMLSchema-instance</code> 
  +     * and value <code>true</code> (xsi:nil) even if it has no text or 
  +     * element content despite a <code>content type</code> which would 
  +     * otherwise require content. 
        */
  -    public boolean getIsNillable();
  +    public boolean getNillable();
   
       /**
  -     * {identity-constraint definitions} A set of constraint definitions.
  +     * identity-constraint definitions: a set of constraint definitions. 
        */
       public XSNamedMap getIdentityConstraints();
   
       /**
  -     * {substitution group affiliation} Optional. A top-level element
  -     * definition.
  +     * [substitution group affiliation]: optional. A top-level element 
  +     * definition. 
        */
       public XSElementDeclaration getSubstitutionGroupAffiliation();
   
       /**
  -     * Convenience method. Check if <code>exclusion</code> is a substitution
  -     * group exclusion for this element declaration.
  -     * @param exclusion Extension, restriction or none. Represents final
  -     *   set for the element.
  -     * @return True if <code>exclusion</code> is a part of the substitution
  -     *   group exclusion subset.
  -     */
  -    public boolean getIsSubstitutionGroupExclusion(short exclusion);
  -
  -    /**
  -     * Specifies if this declaration can be nominated as
  -     * the {substitution group affiliation} of other
  -     * element declarations having the same {type definition}
  -     * or types derived therefrom.
  -     *
  -     * @return A bit flag representing {extension, restriction} or NONE.
  -     */
  -    public short getSubstitutionGroupExclusions();
  +     * Convenience method. Check if <code>exclusion</code> is a substitution 
  +     * group exclusion for this element declaration. 
  +     * @param exclusion  
  +     *   <code>DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code> or 
  +     *   <code>DERIVATION_NONE</code>. Represents final set for the element.
  +     * @return True if <code>exclusion</code> is a part of the substitution 
  +     *   group exclusion subset. 
  +     */
  +    public boolean isSubstitutionGroupExclusion(short exclusion);
   
       /**
  -     * Convenience method. Check if <code>disallowed</code> is a disallowed
  -     * substitution for this element declaration.
  -     * @param disallowed Substitution, extension, restriction or none.
  -     *   Represents a block set for the element.
  -     * @return True if <code>disallowed</code> is a part of the substitution
  -     *   group exclusion subset.
  -     */
  -    public boolean getIsDisallowedSubstition(short disallowed);
  +     *  [substitution group exclusions]: the returned value is a bit 
  +     * combination of the subset of {
  +     * <code>DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>} or 
  +     * <code>DERIVATION_NONE</code>. 
  +     */
  +    public short getSubstitutionGroupExclusions();
   
       /**
  -     * The supplied values for {disallowed substitutions}
  -     *
  -     * @return A bit flag representing {substitution, extension, restriction} or NONE.
  +     * Convenience method. Check if <code>disallowed</code> is a disallowed 
  +     * substitution for this element declaration. 
  +     * @param disallowed {
  +     *   <code>DERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>
  +     *   } or <code>DERIVATION_NONE</code>. Represents a block set for the 
  +     *   element.
  +     * @return True if <code>disallowed</code> is a part of the substitution 
  +     *   group exclusion subset. 
  +     */
  +    public boolean isDisallowedSubstitution(short disallowed);
  +
  +    /**
  +     *  [disallowed substitutions]: the returned value is a bit combination of 
  +     * the subset of {
  +     * <code>DERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>
  +     * } corresponding to substitutions disallowed by this 
  +     * <code>XSElementDeclaration</code> or <code>DERIVATION_NONE</code>. 
        */
       public short getDisallowedSubstitutions();
   
       /**
  -     * {abstract} A boolean.
  +     * {abstract} A boolean. 
        */
  -    public boolean getIsAbstract();
  +    public boolean getAbstract();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. Annotation. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.4       +79 -87    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSModel.java
  
  Index: XSModel.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSModel.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSModel.java	17 Jun 2002 18:41:46 -0000	1.3
  +++ XSModel.java	14 Jan 2003 20:21:46 -0000	1.4
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -57,129 +57,121 @@
   
   package org.apache.xerces.impl.xs.psvi;
   
  -
   /**
  - * 3.15.1 The Schema Itself. A read-only interface that represents an XML
  - * Schema.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents an XML Schema. 
    */
   public interface XSModel {
  -
       /**
  -     * Convenience method. Returns a list of all namespaces that belong to
  -     * this schema. The value "null" is not a valid namespace name, but if
  -     * there are components that don't have a target namespace, "null" is
  -     * included in this list.
  -     * @return A list of all namespaces that belong to this schema.
  +     * Convenience method. Returns a list of all namespaces that belong to 
  +     * this schema. The value <code>null</code> is not a valid namespace 
  +     * name, but if there are components that don't have a target namespace, 
  +     * <code>null</code> is included in this list. 
        */
       public StringList getNamespaces();
   
       /**
  -     * Convenience method. Returns a list of all [namespace schema information
  -     * item]s. There is one such item for each namespace (including the null
  -     * namespace). Enties of the returned enumeration are instances of
  -     * XSNamespaceItem interface.
  -     * @return A list of namespace items that belong to this schema.
  -     */
  -    public ObjectList getNamespaceItems();
  -
  -    /**
  -     * Returns a list of top-level components, i.e. element declarations,
  -     * attribute declarations, etc.<p>
  -     * Note that  <code>XSTypeDefinition#SIMPLE_TYPE</code> and
  -     * <code>XSTypeDefinition#COMPLEX_TYPE</code> can also be used as the
  -     * <code>objectType</code> to retrieve only complex types or simple types,
  -     * instead of all types.
  -     * @param objectType The type of the declaration, i.e.
  -     *   ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, etc.
  -     * @return A list of top-level definition of the specified type in
  -     *   <code>objectType</code> or <code>null</code>.
  +     * A set of namespace schema information information items ( of type 
  +     * <code>XSNamespaceItem</code>), one for each namespace name which 
  +     * appears as the target namespace of any schema component in the schema 
  +     * used for that assessment, and one for absent if any schema component 
  +     * in the schema had no target namespace. For more information see 
  +     * schema information. 
  +     */
  +    public XSNamespaceItemList getNamespaceItems();
  +
  +    /**
  +     * Returns a list of top-level components, i.e. element declarations, 
  +     * attribute declarations, etc. 
  +     * @param objectType The type of the declaration, i.e. 
  +     *   <code>ELEMENT_DECLARATION</code>. Note that 
  +     *   <code>XSTypeDefinition.SIMPLE_TYPE</code> and 
  +     *   <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the 
  +     *   <code>objectType</code> to retrieve only complex types or simple 
  +     *   types, instead of all types.
  +     * @return A list of top-level definitions of the specified type in 
  +     *   <code>objectType</code> or <code>null</code>. 
        */
       public XSNamedMap getComponents(short objectType);
   
       /**
  -     * Convenience method. Returns a list of top-level component declarations
  -     * that are defined within the specified namespace, i.e. element
  -     * declarations, attribute declarations, etc.
  -     * @param objectType The type of the declaration, i.e.
  -     *   ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, etc.
  -     * @param namespace The namespace to which declaration belong or
  -     *   <code>null</code> (for components with no targetNamespace).
  -     * @return A list of top-level definition of the specified type in
  -     *   <code>objectType</code> and defined in the specified
  -     *   <code>namespace</code> or <code>null</code>.
  +     * Convenience method. Returns a list of top-level component declarations 
  +     * that are defined within the specified namespace, i.e. element 
  +     * declarations, attribute declarations, etc. 
  +     * @param objectType The type of the declaration, i.e. 
  +     *   <code>ELEMENT_DECLARATION</code>.
  +     * @param namespace The namespace to which declaration belong or 
  +     *   <code>null</code> (for components with no target namespace).
  +     * @return A list of top-level definitions of the specified type in 
  +     *   <code>objectType</code> and defined in the specified 
  +     *   <code>namespace</code> or <code>null</code>. 
        */
  -    public XSNamedMap getComponentsByNamespace(short objectType,
  +    public XSNamedMap getComponentsByNamespace(short objectType, 
                                                  String namespace);
   
       /**
  -     * Convenience method. Returns a top-level simple or complex type
  -     * definition.
  -     * @param name The name of the definition.
  -     * @param namespace The namespace of the definition, otherwise null.
  -     * @return An <code>XSTypeDefinition</code> or null if such definition
  -     *   does not exist.
  +     *  [annotations]: a set of annotations. 
        */
  -    public XSTypeDefinition getTypeDefinition(String name,
  -                                              String namespace);
  +    public XSObjectList getAnnotations();
   
       /**
  -     * Convenience method. Returns a top-level attribute declaration.
  +     * Convenience method. Returns a top-level element declaration. 
        * @param name The name of the declaration.
  -     * @param namespace The namespace of the definition, otherwise null.
  -     * @return A top-level attribute declaration or null if such declaration
  -     *   does not exist.
  +     * @param namespace The namespace of the declaration, otherwise null.
  +     * @return A top-level element declaration or null if such declaration 
  +     *   does not exist. 
        */
  -    public XSAttributeDeclaration getAttributeDecl(String name,
  -                                                   String namespace);
  +    public XSElementDeclaration getElementDeclaration(String name, 
  +                                                      String namespace);
   
       /**
  -     * Convenience method. Returns a top-level element declaration.
  +     * Convenience method. Returns a top-level attribute declaration. 
        * @param name The name of the declaration.
  -     * @param namespace The namespace of the definition, otherwise null.
  -     * @return A top-level element declaration or null if such declaration
  -     *   does not exist.
  +     * @param namespace The namespace of the declaration, otherwise null.
  +     * @return A top-level attribute declaration or null if such declaration 
  +     *   does not exist. 
        */
  -    public XSElementDeclaration getElementDecl(String name,
  -                                               String namespace);
  +    public XSAttributeDeclaration getAttributeDeclaration(String name, 
  +                                                          String namespace);
   
       /**
  -     * Convenience method. Returns a top-level attribute group definition.
  +     * Convenience method. Returns a top-level simple or complex type 
  +     * definition. 
        * @param name The name of the definition.
  -     * @param namespace The namespace of the definition, otherwise null.
  -     * @return A top-level attribute group definition or null if such
  -     *   definition does not exist.
  +     * @param namespace The namespace of the declaration, otherwise null.
  +     * @return An <code>XSTypeDefinition</code> or null if such definition 
  +     *   does not exist. 
        */
  -    public XSAttributeGroupDefinition getAttributeGroup(String name,
  -                                                        String namespace);
  +    public XSTypeDefinition getTypeDefinition(String name, 
  +                                              String namespace);
   
       /**
  -     * Convenience method. Returns a top-level model group definition.
  -     *
  -     * @param name      The name of the definition.
  +     * Convenience method. Returns a top-level attribute group definition. 
  +     * @param name The name of the definition.
        * @param namespace The namespace of the definition, otherwise null.
  -     * @return A top-level model group definition definition or null if such
  -     *         definition does not exist.
  +     * @return A top-level attribute group definition or null if such 
  +     *   definition does not exist. 
        */
  -    public XSModelGroupDefinition getModelGroupDefinition(String name,
  -                                                          String namespace);
  +    public XSAttributeGroupDefinition getAttributeGroup(String name, 
  +                                                        String namespace);
   
       /**
  -     * Convenience method. Returns a top-level notation declaration.
  -     *
  -     * @param name      The name of the declaration.
  +     * Convenience method. Returns a top-level model group definition. 
  +     * @param name The name of the definition.
        * @param namespace The namespace of the definition, otherwise null.
  -     * @return A top-level notation declaration or null if such declaration
  -     *         does not exist.
  +     * @return A top-level model group definition definition or null if such 
  +     *   definition does not exist. 
        */
  -    public XSNotationDeclaration getNotationDecl(String name,
  -                                                 String namespace);
  +    public XSModelGroupDefinition getModelGroupDefinition(String name, 
  +                                                          String namespace);
   
       /**
  -     *  {annotations} A set of annotations.
  +     * Convenience method. Returns a top-level notation declaration. 
  +     * @param name The name of the declaration.
  +     * @param namespace The namespace of the declaration, otherwise null.
  +     * @return A top-level notation declaration or null if such declaration 
  +     *   does not exist. 
        */
  -    public XSObjectList getAnnotations();
  +    public XSNotationDeclaration getNotationDeclaration(String name, 
  +                                                        String namespace);
   
   }
  
  
  
  1.2       +16 -19    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSModelGroup.java
  
  Index: XSModelGroup.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSModelGroup.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSModelGroup.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSModelGroup.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,42 +58,39 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.8.1 The Model Group Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Model Group schema component.
    */
   public interface XSModelGroup extends XSTerm {
  -
  +    // Content model compositors
       /**
        * This constant value signifies a sequence operator.
        */
  -    public static final short COMPOSITOR_SEQUENCE   = 1;
  +    public static final short COMPOSITOR_SEQUENCE       = 1;
       /**
        * This constant value signifies a choice operator.
        */
  -    public static final short COMPOSITOR_CHOICE     = 2;
  +    public static final short COMPOSITOR_CHOICE         = 2;
       /**
  -     * This content model represents a simplified version of the SGML
  -     * &amp;-Connector and is limited to the top-level of any content model.
  -     * No element in the content model may appear more than once. Please
  -     * refer to the definition element-all.
  +     * This content model represents a simplified version of the SGML 
  +     * &amp;-Connector and is limited to the top-level of any content model. 
  +     * No element in the all content model may appear more than once.
        */
  -    public static final short COMPOSITOR_ALL        = 3;
  +    public static final short COMPOSITOR_ALL            = 3;
   
       /**
  -     * {compositor} One of all, choice or sequence. The valid constants values
  -     * are: ALL, CHOICE, SEQUENCE.
  +     * [compositor]: one of all, choice or sequence. The valid constants 
  +     * values are: 
  +     * <code>COMPOSITOR_SEQUENCE, COMPOSITOR_CHOICE, COMPOSITOR_ALL</code>. 
        */
       public short getCompositor();
   
       /**
  -     * {particles} A list of particles
  +     *  A list of [particles]. 
        */
       public XSObjectList getParticles();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. An [annotation]. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.2       +6 -10     xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSModelGroupDefinition.java
  
  Index: XSModelGroupDefinition.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSModelGroupDefinition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSModelGroupDefinition.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSModelGroupDefinition.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,20 +58,16 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.7.1 The Model Group Definition Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents is the Model Group Definition schema component.
    */
   public interface XSModelGroupDefinition extends XSObject {
  -
       /**
  -     * {model group} A model group.
  +     * A model group. 
        */
       public XSModelGroup getModelGroup();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. An [annotation]. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.2       +30 -35    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNamedMap.java
  
  Index: XSNamedMap.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNamedMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSNamedMap.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSNamedMap.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,48 +58,43 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * Objects implementing the <code>XSNamedMap</code> interface are used to
  - * represent collections of objects that can be accessed by
  - * name. Objects contained in an object implementing
  - * <code>XSNamedMap</code> may also be accessed by an ordinal index, but
  - * this is simply to allow convenient enumeration of the contents of a
  - * <code>XSNamedMap</code>, and does not imply that the this API specifies an
  - * order to these <code>XSObjects</code>.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * Objects implementing the <code>XSNamedMap</code> interface are used to 
  + * represent collections of XML Schema components that can be accessed by 
  + * name. Note that <code>XSNamedMap</code> does not inherit from 
  + * <code>XSObjectList</code>. The <code>XSOBject</code>s in 
  + * <code>XSNamedMap</code>s are not maintained in any particular order. 
    */
   public interface XSNamedMap {
  -
       /**
  -     * The number of <code>XSObjects</code> in the <code>XSObjectList</code>. The
  -     * range of valid child node indices is 0 to <code>length-1</code>
  -     * inclusive.
  +     * The number of <code>XSObjects</code> in the <code>XSObjectList</code>. 
  +     * The range of valid child object indices is 0 to 
  +     * <code>mapLength-1</code> inclusive. 
        */
       public int getMapLength();
   
       /**
  -     * Retrieves an <code>XSObject</code> specified by local name and namespace
  -     * URI.
  -     * @param namespace The namespace URI of the <code>XSObject</code> to
  -     *   retrieve.
  -     * @param localName The local name of the <code>XSObject</code> to retrieve.
  -     * @return A <code>XSObject</code> (of any type) with the specified local
  -     *   name and namespace URI, or <code>null</code> if they do not
  -     *   identify any <code>XSObject</code> in this map.
  +     *  Returns the <code>index</code>th item in the collection. The index 
  +     * starts at 0. If <code>index</code> is greater than or equal to the 
  +     * number of objects in the list, this returns <code>null</code>. 
  +     * @param index  index into the collection. 
  +     * @return  The <code>XSObject</code> at the <code>index</code>th 
  +     *   position in the <code>XSObjectList</code>, or <code>null</code> if 
  +     *   that is not a valid index. 
        */
  -    public XSObject getNSItem(String namespace, String localName);
  +    public XSObject item(int index);
   
       /**
  -     * Returns the <code>index</code>th item in the map. The index starts at
  -     * 0. If <code>index</code> is greater than or equal to the number of
  -     * nodes in the list, this returns <code>null</code>.
  -     * @param index The position in the map from which the item is to be
  -     *   retrieved.
  -     * @return The <code>XSObject</code> at the <code>index</code>th position
  -     *   in the <code>XSNamedMap</code>, or <code>null</code> if that is
  -     *   not a valid index.
  +     * Retrieves a node specified by local name and namespace URI.
  +     * <br>Per , applications must use the value null as the 
  +     * <code>namespace</code> parameter for methods if they wish to have no 
  +     * namespace.
  +     * @param namespace The namespace URI of the node to retrieve.
  +     * @param localName The local name of the node to retrieve.
  +     * @return A <code>XSObject</code> (of any type) with the specified local 
  +     *   name and namespace URI, or <code>null</code> if they do not 
  +     *   identify any node in this map.
        */
  -    public XSObject getItem(int index);
  +    public XSObject itemByName(String namespace, 
  +                              String localName);
   
   }
  
  
  
  1.3       +50 -59    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNamespaceItem.java
  
  Index: XSNamespaceItem.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNamespaceItem.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSNamespaceItem.java	17 Jun 2002 18:41:46 -0000	1.2
  +++ XSNamespaceItem.java	14 Jan 2003 20:21:46 -0000	1.3
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,97 +58,88 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * A read-only interface that represents a namespace schema information item.
  - *
  - * @author Sandy Gao, IBM
  - * @version $Id$
  + * The interfaces represents the namespace schema information information 
  + * item. Each namespace schema information information item corresponds to 
  + * an XML Schema with unique namespace name.
    */
   public interface XSNamespaceItem {
  -
       /**
  -     * [schema namespace]
  -     * @see <a href="http://www.w3.org/TR/xmlschema-1/#nsi-schema_namespace">[schema namespace]</a>
  -     * @return The target namespace of this item.
  +     * [schema namespace]: A namespace name or <code>null</code>.
        */
       public String getSchemaNamespace();
   
       /**
  -     * Returns a list of top-level components, i.e. element declarations,
  -     * attribute declarations, etc.<p>
  -     * Note that  <code>XSTypeDefinition#SIMPLE_TYPE</code> and
  -     * <code>XSTypeDefinition#COMPLEX_TYPE</code> can also be used as the
  -     * <code>objectType</code> to retrieve only complex types or simple types,
  -     * instead of all types.
  -     * @param objectType The type of the declaration, i.e.
  -     *   ELEMENT_DECLARATION, ATTRIBUTE_DECLARATION, etc.
  -     * @return A list of top-level definition of the specified type in
  -     *   <code>objectType</code> or <code>null</code>.
  +     * [schema components]: a list of top-level components, i.e. element 
  +     * declarations, attribute declarations, etc. 
  +     * @param objectType The type of the declaration, i.e. 
  +     *   <code>ELEMENT_DECLARATION</code>. Note that 
  +     *   <code>XSTypeDefinition.SIMPLE_TYPE</code> and 
  +     *   <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the 
  +     *   <code>objectType</code> to retrieve only complex types or simple 
  +     *   types, instead of all types.
  +     * @return A list of top-level definition of the specified type in 
  +     *   <code>objectType</code> or <code>null</code>. 
        */
       public XSNamedMap getComponents(short objectType);
   
       /**
  -     * Convenience method. Returns a top-level simple or complex type
  -     * definition.
  -     * @param name The name of the definition.
  -     * @return An <code>XSTypeDefinition</code> or null if such definition
  -     *   does not exist.
  +     *  [annotations]: a set of annotations.
        */
  -    public XSTypeDefinition getTypeDefinition(String name);
  +    public XSObjectList getAnnotations();
   
       /**
  -     * Convenience method. Returns a top-level attribute declaration.
  +     * Convenience method. Returns a top-level element declaration. 
        * @param name The name of the declaration.
  -     * @return A top-level attribute declaration or null if such declaration
  -     *   does not exist.
  +     * @return A top-level element declaration or <code>null</code> if such 
  +     *   declaration does not exist. 
        */
  -    public XSAttributeDeclaration getAttributeDecl(String name);
  +    public XSElementDeclaration getElementDeclaration(String name);
   
       /**
  -     * Convenience method. Returns a top-level element declaration.
  +     * Convenience method. Returns a top-level attribute declaration. 
        * @param name The name of the declaration.
  -     * @return A top-level element declaration or null if such declaration
  -     *   does not exist.
  +     * @return A top-level attribute declaration or <code>null</code> if such 
  +     *   declaration does not exist. 
        */
  -    public XSElementDeclaration getElementDecl(String name);
  +    public XSAttributeDeclaration getAttributeDeclaration(String name);
   
       /**
  -     * Convenience method. Returns a top-level attribute group definition.
  +     * Convenience method. Returns a top-level simple or complex type 
  +     * definition. 
        * @param name The name of the definition.
  -     * @return A top-level attribute group definition or null if such
  -     *   definition does not exist.
  +     * @return An <code>XSTypeDefinition</code> or <code>null</code> if such 
  +     *   definition does not exist. 
        */
  -    public XSAttributeGroupDefinition getAttributeGroup(String name);
  +    public XSTypeDefinition getTypeDefinition(String name);
   
       /**
  -     * Convenience method. Returns a top-level model group definition.
  -     *
  -     * @param name      The name of the definition.
  -     * @return A top-level model group definition definition or null if such
  -     *         definition does not exist.
  +     * Convenience method. Returns a top-level attribute group definition. 
  +     * @param name The name of the definition.
  +     * @return A top-level attribute group definition or <code>null</code> if 
  +     *   such definition does not exist. 
        */
  -    public XSModelGroupDefinition getModelGroupDefinition(String name);
  +    public XSAttributeGroupDefinition getAttributeGroup(String name);
   
       /**
  -     * Convenience method. Returns a top-level notation declaration.
  -     *
  -     * @param name      The name of the declaration.
  -     * @return A top-level notation declaration or null if such declaration
  -     *         does not exist.
  +     * Convenience method. Returns a top-level model group definition. 
  +     * @param name The name of the definition.
  +     * @return A top-level model group definition definition or 
  +     *   <code>null</code> if such definition does not exist. 
        */
  -    public XSNotationDeclaration getNotationDecl(String name);
  +    public XSModelGroupDefinition getModelGroupDefinition(String name);
   
       /**
  -     * [document]
  -     * @see <a href="http://www.w3.org/TR/xmlschema-1/#sd-document">[document]</a>
  -     * @return a list of document information item
  +     * Convenience method. Returns a top-level notation declaration. 
  +     * @param name The name of the declaration.
  +     * @return A top-level notation declaration or <code>null</code> if such 
  +     *   declaration does not exist. 
        */
  -    public ObjectList getDocuments();
  +    public XSNotationDeclaration getNotationDeclaration(String name);
   
       /**
  -     * [document location]
  -     * @see <a href="http://www.w3.org/TR/xmlschema-1/#sd-document_location">[document location]</a>
  -     * @return a list of document information item
  +     * [document location] - a list of locations URI for the documents that 
  +     * contributed to the XSModel.
        */
       public StringList getDocumentLocations();
  -    
  +
   }
  
  
  
  1.2       +9 -12     xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNotationDeclaration.java
  
  Index: XSNotationDeclaration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNotationDeclaration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSNotationDeclaration.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSNotationDeclaration.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,26 +58,23 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.12.1 The Notation Declaration Schema Component
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + *  This interface represents the Notation Declaration schema component. 
    */
   public interface XSNotationDeclaration extends XSObject {
  -
       /**
  -     * Optional if {public identifier} is present. A URI reference.
  +     *  The URI reference representing the system identifier for the notation 
  +     * declaration, if present, <code>null</code> otherwise. 
        */
       public String getSystemId();
   
       /**
  -     * Optional if {system identifier} is present. A public identifier,
  -     * as defined in [XML 1.0 (Second Edition)]. 
  +     *  The string representing the public identifier for this notation 
  +     * declaration, if present; <code>null</code> otherwise. 
        */
       public String getPublicId();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. An [annotation]. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.2       +18 -15    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSObject.java
  
  Index: XSObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSObject.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSObject.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSObject.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,38 +49,41 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * The <code>XSObject</code> is a base object for XML Schema component model.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * The <code>XSObject</code> is a base object for the XML Schema component 
  + * model. 
    */
   public interface XSObject {
  -
       /**
  -     * Get the type of the object, i.e ELEMENT_DECLARATION.
  +     *  The <code>type</code> of this object, i.e. 
  +     * <code>ELEMENT_DECLARATION</code>. 
        */
       public short getType();
   
       /**
  -     * The <code>name</code> of this <code>XSObject</code> depending on the
  -     * <code>XSObject</code> type.
  +     * The name of type <code>NCName</code> of this declaration as defined in 
  +     * XML Namespaces.
        */
       public String getName();
   
       /**
  -     * The namespace URI of this node, or <code>null</code> if it is
  -     * unspecified.  defines how a namespace URI is attached to schema
  -     * components.
  +     *  The [target namespace] of this object, or <code>null</code> if it is 
  +     * unspecified. 
        */
       public String getNamespace();
  +
  +    /**
  +     * A namespace schema information itemcorresponding to the target 
  +     * namespace of the component, if it's globally declared; or null 
  +     * otherwise.
  +     */
  +    public XSNamespaceItem getNamespaceItem();
   
   }
  
  
  
  1.3       +16 -21    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSObjectList.java
  
  Index: XSObjectList.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSObjectList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSObjectList.java	17 Jun 2002 18:41:46 -0000	1.2
  +++ XSObjectList.java	14 Jan 2003 20:21:46 -0000	1.3
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,39 +49,34 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * The <code>XSObjectList</code> interface provides the abstraction of an
  - * ordered collection of object, without defining or constraining how this
  - * collection is implemented.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + *  The <code>XSObjectList</code> interface provides the abstraction of an 
  + * ordered collection of <code>XSObject</code>s, without defining or 
  + * constraining how this collection is implemented. 
    */
   public interface XSObjectList {
  -
       /**
  -     * The number of <code>XSObjects</code> in the list. The range of valid
  -     * child node indices is 0 to <code>length-1</code> inclusive.
  +     *  The number of <code>XSObjects</code> in the list. The range of valid 
  +     * child object indices is 0 to <code>length-1</code> inclusive. 
        */
       public int getLength();
   
       /**
  -     * Returns the <code>index</code>th item in the collection. The index
  -     * starts at 0. If <code>index</code> is greater than or equal to the
  -     * number of nodes in the list, this returns <code>null</code>.
  -     * @param index index into the collection.
  -     * @return The XSObject at the <code>index</code>th position in the
  -     *   <code>XSObjectList</code>, or <code>null</code> if that is not a
  -     *   valid index.
  +     *  Returns the <code>index</code>th item in the collection. The index 
  +     * starts at 0. If <code>index</code> is greater than or equal to the 
  +     * number of objects in the list, this returns <code>null</code>. 
  +     * @param index  index into the collection. 
  +     * @return  The <code>XSObject</code> at the <code>index</code>th 
  +     *   position in the <code>XSObjectList</code>, or <code>null</code> if 
  +     *   that is not a valid index. 
        */
  -    public XSObject getItem(int index);
  +    public XSObject item(int index);
   
   }
  
  
  
  1.2       +11 -14    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSParticle.java
  
  Index: XSParticle.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSParticle.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSParticle.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSParticle.java	14 Jan 2003 20:21:46 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,30 +58,27 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.9.1 The Particle Schema Component
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Particle schema component.
    */
   public interface XSParticle extends XSObject {
  -
       /**
  -     * {min occurs} determines the minimum number of terms that can occur.
  +     * [min occurs]: determines the minimum number of terms that can occur. 
        */
       public int getMinOccurs();
   
       /**
  -     * {max occurs} whether the maxOccurs value is unbounded.
  +     * [max occurs] determines the maximum number of terms that can occur. To 
  +     * query for value of unbounded use <code>maxOccursUnbounded</code>. 
        */
  -    public boolean getIsMaxOccursUnbounded();
  +    public int getMaxOccurs();
   
       /**
  -     * {max occurs} determines the maximum number of terms that can occur.
  +     * [max occurs] whether the maxOccurs value is unbounded.
        */
  -    public int getMaxOccurs();
  +    public boolean getMaxOccursUnbounded();
   
       /**
  -     * {term} One of a model group, a wildcard, or an element declaration.
  +     * [term]: one of a model group, a wildcard, or an element declaration. 
        */
       public XSTerm getTerm();
   
  
  
  
  1.3       +98 -116   xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSSimpleTypeDefinition.java
  
  Index: XSSimpleTypeDefinition.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSSimpleTypeDefinition.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSSimpleTypeDefinition.java	17 Jun 2002 18:41:46 -0000	1.2
  +++ XSSimpleTypeDefinition.java	14 Jan 2003 20:21:47 -0000	1.3
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -57,211 +57,193 @@
   
   package org.apache.xerces.impl.xs.psvi;
   
  -
   /**
  - * 4.1.1 The Simple Type Definition Schema Component (XML Schema Part 2).
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Simple Type Definition schema component.
    */
   public interface XSSimpleTypeDefinition extends XSTypeDefinition {
  -
  -    /**
  -     * <code>XSSimpleType</code> variety
  -     */
  -    public static final short VARIETY_ABSENT        = 0;
  +    // Variety definitions
       /**
  -     * <code>XSSimpleType</code> variety
  +     * The variety is absent for the anySimpleType definition.
        */
  -    public static final short VARIETY_ATOMIC        = 1;
  +    public static final short VARIETY_ABSENT            = 0;
       /**
  -     * <code>XSSimpleType</code> variety
  +     * <code>Atomic</code> type.
        */
  -    public static final short VARIETY_LIST          = 2;
  +    public static final short VARIETY_ATOMIC            = 1;
       /**
  -     * <code>XSSimpleType</code> variety
  +     * <code>List</code> type.
        */
  -    public static final short VARIETY_UNION         = 3;
  -
  +    public static final short VARIETY_LIST              = 2;
       /**
  -     * constants defined for the 'ordered' fundamental facet.
  -     * see <a href='http://www.w3.org/TR/xmlschema-2/#rf-fund-facets'> XML
  -     * Schema Part 2: Datatypes </a>
  +     * <code>Union</code> type.
        */
  -    /** not ordered */
  -    public static final short ORDERED_FALSE         = 0;
  -    /** partically ordered */
  -    public static final short ORDERED_PARTIAL       = 1;
  -    /** totally ordered */
  -    public static final short ORDERED_TOTAL         = 2;
  +    public static final short VARIETY_UNION             = 3;
   
       // Facets
       /**
  -     * none
  +     * No facets defined.
        */
  -    public static final short FACET_NONE            = 0;
  +    public static final short FACET_NONE                = 0;
       /**
        * 4.3.1 Length
        */
  -    public static final short FACET_LENGTH          = 1<<1;
  +    public static final short FACET_LENGTH              = 1;
       /**
  -     * 4.3.2 minLength.
  +     * 4.3.2 minLength. 
        */
  -    public static final short FACET_MINLENGTH       = 1<<2;
  +    public static final short FACET_MINLENGTH           = 2;
       /**
        * 4.3.3 maxLength.
        */
  -    public static final short FACET_MAXLENGTH       = 1<<3;
  +    public static final short FACET_MAXLENGTH           = 4;
       /**
        * 4.3.4 pattern.
        */
  -    public static final short FACET_PATTERN         = 1<<4;
  +    public static final short FACET_PATTERN             = 8;
       /**
  -     * 4.3.5 enumeration.
  +     * 4.3.5 whitespace.
        */
  -    public static final short FACET_ENUMERATION     = 1<<5;
  -    /**
  -     * 4.3.6 whitespace.
  -     */
  -    public static final short FACET_WHITESPACE      = 1<<6;
  +    public static final short FACET_WHITESPACE          = 16;
       /**
        * 4.3.7 maxInclusive.
        */
  -    public static final short FACET_MAXINCLUSIVE    = 1<<7;
  +    public static final short FACET_MAXINCLUSIVE        = 32;
       /**
        * 4.3.9 maxExclusive.
        */
  -    public static final short FACET_MAXEXCLUSIVE    = 1<<8;
  +    public static final short FACET_MAXEXCLUSIVE        = 64;
       /**
        * 4.3.9 minExclusive.
        */
  -    public static final short FACET_MINEXCLUSIVE    = 1<<9;
  +    public static final short FACET_MINEXCLUSIVE        = 128;
       /**
        * 4.3.10 minInclusive.
        */
  -    public static final short FACET_MININCLUSIVE    = 1<<10;
  +    public static final short FACET_MININCLUSIVE        = 256;
       /**
        * 4.3.11 totalDigits .
        */
  -    public static final short FACET_TOTALDIGITS     = 1<<11;
  +    public static final short FACET_TOTALDIGITS         = 512;
       /**
        * 4.3.12 fractionDigits.
        */
  -    public static final short FACET_FRACTIONDIGITS  = 1<<12;
  -
  +    public static final short FACET_FRACTIONDIGITS      = 1024;
       /**
  -     * {Facets} Check whether a facet is defined on this type.
  -     * @param facetName The name of the facet.
  -     * @return          true if the facet is defined; false othereise.
  +     * 4.3.5 enumeration.
        */
  -    public boolean getIsDefinedFacet(short facetName);
  +    public static final short FACET_ENUMERATION         = 2048;
   
       /**
  -     * {Facets} Get all facets defined on this type.
  -     * @return  bit combination of FACET_XXX constants of all defined facets.
  +     * A constant defined for the 'ordered' fundamental facet: Not ordered.
        */
  -    public short getDefinedFacets();
  +    public static final short ORDERED_FALSE             = 0;
  +    /**
  +     * A constant defined for the 'ordered' fundamental facet: partially 
  +     * ordered.
  +     */
  +    public static final short ORDERED_PARTIAL           = 1;
  +    /**
  +     * A constant defined for the 'ordered' fundamental facet: total ordered.
  +     */
  +    public static final short ORDERED_TOTAL             = 2;
  +    /**
  +     * [variety]: one of {atomic, list, union} or absent 
  +     */
  +    public short getVariety();
   
       /**
  -     * {Facets} Check whether a facet is defined and fixed on this type.
  -     * @param facetName The name of the facet.
  -     * @return          true if the facet is defined and fixed; false othereise.
  +     * If variety is <code>atomic</code> the primitive type definition (a 
  +     * built-in primitive datatype definition or the simple ur-type 
  +     * definition) is available, otherwise <code>null</code>. 
        */
  -    public boolean getIsFixedFacet(short facetName);
  +    public XSSimpleTypeDefinition getPrimitiveType();
   
       /**
  -     * {Facets} Get all facets defined and fixed on this type.
  -     * @return  bit combination of FACET_XXX constants of all fixed facets.
  +     * If variety is <code>list</code> the item type definition (an atomic or 
  +     * union simple type definition) is available, otherwise 
  +     * <code>null</code>. 
        */
  -    public short getFixedFacets();
  +    public XSSimpleTypeDefinition getItemType();
   
       /**
  -     * Convenience method. Returns a value of a single constraining facet for
  -     * this simple type definition. This method must not be used to retrieve
  -     * values for <code>enumeration</code> and <code>pattern</code> facets.
  -     * @param facetName The name of the facet, i.e.
  -     *   <code>FACET_LENGTH, FACET_TOTALDIGITS </code> (see
  -     *   <code>XSConstants</code>).To retrieve value for pattern or
  -     *   enumeration, see <code>enumeration</code> and <code>pattern</code>.
  -     * @return A value of the facet specified in <code>facetName</code> for
  -     *   this simple type definition or <code>null</code>.
  +     * If variety is <code>union</code> the list of member type definitions (a 
  +     * non-empty sequence of simple type definitions) is available, 
  +     * otherwise <code>null</code>. 
        */
  -    public String getLexicalFacetValue(short facetName);
  +    public XSObjectList getMemberTypes();
   
       /**
  -     * Returns a list of enumeration values, as <code>String</code>'s.
  +     * [facets]: get all facets defined on this type. The value is a bit 
  +     * combination of FACET_XXX constants of all defined facets. 
        */
  -    public StringList getLexicalEnumerations();
  +    public short getDefinedFacets();
   
       /**
  -     * Returns a list of pattern values, as <code>String</code>'s.
  +     * Convenience method. [Facets]: check whether a facet is defined on this 
  +     * type.
  +     * @param facetName  The name of the facet. 
  +     * @return  True if the facet is defined, false otherwise.
        */
  -    public StringList getLexicalPatterns();
  +    public boolean isDefinedFacet(short facetName);
   
       /**
  -     * Fundamental Facet: [Definition:] An order relation on a value space is
  -     * a mathematical relation that imposes a total order or a partial order
  -     * on the members of the value space.
  +     * [facets]: get all facets defined and fixed on this type.
        */
  -    public short getOrdered();
  +    public short getFixedFacets();
   
       /**
  -     * Fundamental Facet: [Definition:] Every value space has associated with
  -     * it the concept of cardinality. Some value spaces are finite, some are
  -     * countably infinite while still others could conceivably be
  -     * uncountably infinite (although no value space defined by this
  -     * specification is uncountable infinite). A datatype is said to have
  -     * the cardinality of its value space.
  +     * Convenience method. [Facets]: check whether a facet is defined and 
  +     * fixed on this type. 
  +     * @param facetName  The name of the facet. 
  +     * @return  True if the facet is fixed, false otherwise.
  +     */
  +    public boolean isFixedFacet(short facetName);
  +
  +    /**
  +     * Convenience method. Returns a value of a single constraining facet for 
  +     * this simple type definition. This method must not be used to retrieve 
  +     * values for <code>enumeration</code> and <code>pattern</code> facets. 
  +     * @param facetName The name of the facet, i.e. 
  +     *   <code>FACET_LENGTH, FACET_TOTALDIGITS </code> (see 
  +     *   <code>XSConstants</code>).To retrieve value for pattern or 
  +     *   enumeration, see <code>enumeration</code> and <code>pattern</code>.
  +     * @return A value of the facet specified in <code>facetName</code> for 
  +     *   this simple type definition or <code>null</code>. 
        */
  -    public boolean getIsFinite();
  +    public String getLexicalFacetValue(short facetName);
   
       /**
  -     * Fundamental Facet: [Definition:] A datatype is bounded if its value
  -     * space has either an inclusive upper bound or an exclusive upper bound
  -     * and either an inclusive lower bound and an exclusive lower bound.
  -     * Should bounded be of type boolean? Should this facet provide more
  -     * information (discontinuous)?
  +     * Returns a list of enumeration values. 
        */
  -    public boolean getIsBounded();
  +    public StringList getLexicalEnumeration();
   
       /**
  -     * Fundamental Facet: [Definition:] A datatype is said to be numeric if
  -     * its values are conceptually quantities (in some mathematical number
  -     * system). [Definition:] A datatype whose values are not numeric is
  -     * said to be non-numeric.
  +     * Returns a list of pattern values. 
        */
  -    public boolean getIsNumeric();
  +    public StringList getLexicalPattern();
   
       /**
  -     * {variety} One of {atomic, list, union}. The valid constant values
  -     * defined in <code>XSConstants</code> are <code>UNION</code>,
  -     * <code>LIST</code>, <code>ATOMIC</code>.
  +     *  Fundamental Facet: ordered 
        */
  -    public short getVariety();
  +    public short getOrdered();
   
       /**
  -     * If variety is <code>atomic</code> the primitive type definition (a
  -     * built-in primitive datatype definition or the simple ur-type
  -     * definition) is available, otherwise <code>null</code>.
  +     * Fundamental Facet: cardinality. 
        */
  -    public XSSimpleTypeDefinition getPrimitiveType();
  +    public boolean getFinite();
   
       /**
  -     * If variety is <code>list</code> the item type definition (an atomic or
  -     * union simple type definition) is available, otherwise
  -     * <code>null</code>.
  +     * Fundamental Facet: bounded. 
        */
  -    public XSSimpleTypeDefinition getItemType();
  +    public boolean getBounded();
   
       /**
  -     * If variety is <code>union</code> the list of member type definitions (a
  -     * non-empty sequence of simple type definitions) is available,
  -     * otherwise <code>null</code>.
  +     * Fundamental Facet: numeric. 
        */
  -    public XSObjectList getMemberTypes();
  +    public boolean getNumeric();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. An [annotation]. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.2       +7 -9      xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSTerm.java
  
  Index: XSTerm.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSTerm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XSTerm.java	13 May 2002 21:31:34 -0000	1.1
  +++ XSTerm.java	14 Jan 2003 20:21:47 -0000	1.2
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,12 +58,10 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * Describes term that can be one of a model group, a wildcard, or an element
  - * declaration. Objects implementing XSElementDecl, XSModelGroup and XSWildcard
  - * interfaces also implement this interface.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * Describes term that can be one of a model group, a wildcard, or an element 
  + * declaration. Objects implementing <code>XSElementDeclaration</code>, 
  + * <code>XSModelGroup</code> and <code>XSWildcard</code> interfaces also 
  + * implement this interface. 
    */
   public interface XSTerm extends XSObject {
   }
  
  
  
  1.3       +61 -33    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSTypeDefinition.java
  
  Index: XSTypeDefinition.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSTypeDefinition.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSTypeDefinition.java	16 May 2002 18:25:55 -0000	1.2
  +++ XSTypeDefinition.java	14 Jan 2003 20:21:47 -0000	1.3
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -59,57 +59,85 @@
   
   /**
    * This interface represents a complex or simple type definition.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
    */
   public interface XSTypeDefinition extends XSObject {
  -
       /**
        * This constant value signifies a complex type.
        */
  -    public static final short COMPLEX_TYPE   = XSConstants.ANNOTATION+1;
  +    public static final short COMPLEX_TYPE              = 13;
       /**
        * This constant value signifies a simple type.
        */
  -    public static final short SIMPLE_TYPE    = XSConstants.ANNOTATION+2;
  -
  +    public static final short SIMPLE_TYPE               = 14;
       /**
        * Return whether this type definition is a simple type or complex type.
        */
       public short getTypeCategory();
  -    
  +
       /**
  -     * {base type definition} Either a simple type definition or a complex
  -     * type definition.
  +     * {base type definition}: either a simple type definition or a complex 
  +     * type definition. 
        */
       public XSTypeDefinition getBaseType();
   
       /**
  -     * {final} For complex type definition it is a subset of {extension,
  -     * restriction}. For simple type definition it is a subset of
  -     * {extension, list, restriction, union}.
  -     * @param derivation  Extension, restriction, list, union constants
  -     *   (defined in <code>XSConstants</code>).
  -     * @return True if derivation is in the final set, otherwise false.
  -     */
  -    public boolean getIsFinal(short derivation);
  -
  -    /**
  -     * {final} For complex type definition it is a subset of {extension,
  -     * restriction}. For simple type definition it is a subset of
  -     * {extension, list, restriction, union}.
  -     * @return A bit flag that represents:
  -     *         {extension, restriction) or none for complexTypes;
  -     *         {extension, list, restriction, union} or none for simpleTypes;
  +     * {final}. For complex type definition it is a subset of {extension, 
  +     * restriction}. For simple type definition it is a subset of 
  +     * {extension, list, restriction, union}. 
  +     * @param restriction  Extension, restriction, list, union constants 
  +     *   (defined in <code>XSConstants</code>). 
  +     * @return True if restriction is in the final set, otherwise false.
  +     */
  +    public boolean isFinal(short restriction);
  +
  +    /**
  +     * For complex types the returned value is a bit combination of the subset 
  +     * of {<code>DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>} 
  +     * corresponding to <code>final</code> set of this type or 
  +     * <code>DERIVATION_NONE</code>. For simple types the returned value is 
  +     * a bit combination of the subset of { 
  +     * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST</code>
  +     * } corresponding to <code>final</code> set of this type or 
  +     * <code>DERIVATION_NONE</code>. 
        */
       public short getFinal();
   
       /**
  -     * A boolean that specifies if the type definition is anonymous.
  -     * Convenience attribute. This is a field is not part of
  -     * XML Schema component model.
  +     *  Convenience. A boolean that specifies if the type definition is 
  +     * anonymous. Convenience attribute. 
        */
  -    public boolean getIsAnonymous();
  +    public boolean getAnonymous();
  +
  +    /**
  +     * Convenience method: check if this type is derived from the given 
  +     * <code>ancestorType</code>. 
  +     * @param ancestorType  An ancestor type definition. 
  +     * @param derivationMethod  A bit combination representing a subset of {
  +     *   <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST</code>
  +     *   }. 
  +     * @return  Return true if this type is derived from 
  +     *   <code>ancestorType</code> using only derivation methods from the 
  +     *   <code>derivationMethod</code>. Return true if this type is derived 
  +     *   from <code>ancestorType</code>.
  +     */
  +    public boolean derivedFromType(XSTypeDefinition ancestorType, 
  +                                   short derivationMethod);
  +
  +    /**
  +     * Convenience method: check if this type is derived from the given 
  +     * ancestor type. 
  +     * @param namespace  An ancestor type namespace. 
  +     * @param name  An ancestor type name. 
  +     * @param derivationMethod  A bit combination representing a subset of {
  +     *   <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST</code>
  +     *   }. 
  +     * @return  Return true if this type is derived from 
  +     *   <code>ancestorType</code> using only derivation methods from the 
  +     *   <code>derivationMethod</code>. Return true if this type is derived 
  +     *   from <code>ancestorType</code>.
  +     */
  +    public boolean derivedFrom(String namespace, 
  +                               String name, 
  +                               short derivationMethod);
   
   }
  
  
  
  1.3       +31 -36    xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSWildcard.java
  
  Index: XSWildcard.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSWildcard.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSWildcard.java	17 Jun 2002 18:41:46 -0000	1.2
  +++ XSWildcard.java	14 Jan 2003 20:21:47 -0000	1.3
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2002 The Apache Software Foundation.
  - * All rights reserved.
  + * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -49,7 +49,7 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2002, International
  + * originally based on software copyright (c) 2001, International
    * Business Machines, Inc., http://www.apache.org.  For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  @@ -58,67 +58,62 @@
   package org.apache.xerces.impl.xs.psvi;
   
   /**
  - * 3.10.1 The Wildcard Schema Component.
  - *
  - * @author Elena Litani, IBM
  - * @version $Id$
  + * This interface represents the Wildcard schema component.
    */
   public interface XSWildcard extends XSTerm {
  -
  +    // Namespace Constraint
       /**
  -     * Process content strict. There must be a top-level declaration for
  -     * the item available, or the item must have an xsi:type, and the item
  -     * must be valid as appropriate.
  +     * Namespace Constraint: any namespace is allowed.
        */
  -    public static final short PC_STRICT             = 1;
  +    public static final short NSCONSTRAINT_ANY          = 1;
       /**
  -     * Process content skip. No constraints at all: the item must simply
  -     * be well-formed XML.
  +     * Namespace Constraint: namespaces in the list are not allowed.
        */
  -    public static final short PC_SKIP               = 2;
  +    public static final short NSCONSTRAINT_NOT          = 2;
       /**
  -     * Process content lax. If the item, or any items among its [children] if
  -     * it's an element information item, has a uniquely
  -     * determined declaration available, it must be valid
  -     * with respect to that definition, that is, validate
  -     *  where you can, don't worry when you can't.
  +     * Namespace Constraint: namespaces in the list are allowed.
        */
  -    public static final short PC_LAX                = 3;
  +    public static final short NSCONSTRAINT_LIST         = 3;
   
  +    // Process contents
       /**
  -     * Namespace Constraint: any namespace is allowed
  +     * There must be a top-level declaration for the item available, or the 
  +     * item must have an xsi:type, and the item must be valid as appropriate.
        */
  -    public static final short NSCONSTRAINT_ANY      = 1;
  +    public static final short PC_STRICT                 = 1;
       /**
  -     * Namespace Constraint: namespaces in the list are not allowed
  +     * No constraints at all: the item must simply be well-formed XML. 
        */
  -    public static final short NSCONSTRAINT_NOT      = 2;
  +    public static final short PC_SKIP                   = 2;
       /**
  -     * Namespace Constraint: namespaces in the liast are allowed
  +     * If the item, or any items among its [children] is an element 
  +     * information item, has a uniquely determined declaration available, it 
  +     * must be valid with respect to that definition, that is, validate 
  +     * where you can, don't worry when you can't.
        */
  -    public static final short NSCONSTRAINT_LIST     = 3;
  +    public static final short PC_LAX                    = 3;
   
       /**
  -     * Namespace constraint: A constraint type: any, not, list.
  +     * Namespace constraint: A constraint type: any, not, list. 
        */
       public short getConstraintType();
   
       /**
  -     * Namespace constraint. For <code>constraintType</code>
  -     * LIST_NSCONSTRAINT, the list contains allowed namespaces. For
  -     * <code>constraintType</code> NOT_NSCONSTRAINT, the list contains
  -     * disallowed namespaces.
  +     * Namespace constraint. For <code>constraintType</code> 
  +     * <code>LIST_NSCONSTRAINT</code>, the list contains allowed namespaces. 
  +     * For <code>constraintType</code> <code>NOT_NSCONSTRAINT</code>, the 
  +     * list contains disallowed namespaces. 
        */
  -    public StringList getNSConstraintList();
  +    public StringList getNsConstraintList();
   
       /**
  -     * {process contents} One of skip, lax or strict. Valid constants values
  -     * are: SKIP_PROCESS, LAX_PROCESS, STRING_PROCESS.
  +     * [process contents]: one of skip, lax or strict. Valid constants values 
  +     * are: <code>SKIP_PROCESS, LAX_PROCESS, STRING_PROCESS </code>. 
        */
       public short getProcessContents();
   
       /**
  -     * Optional. Annotation.
  +     * Optional. An [annotation]. 
        */
       public XSAnnotation getAnnotation();
   
  
  
  
  1.1                  xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSIDCDefinition.java
  
  Index: XSIDCDefinition.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.xerces.impl.xs.psvi;
  
  /**
   * This interface represents the Identity-constraint Definition schema 
   * component.
   */
  public interface XSIDCDefinition extends XSObject {
      // Identity Constraints
      /**
       * 
       */
      public static final short IC_KEY                    = 1;
      /**
       * 
       */
      public static final short IC_KEYREF                 = 2;
      /**
       * 
       */
      public static final short IC_UNIQUE                 = 3;
  
      /**
       * [identity-constraint category]: one of key, keyref or unique. 
       */
      public short getCategory();
  
      /**
       * [selector]: a restricted  expression. 
       */
      public String getSelectorStr();
  
      /**
       * [fields]: a non-empty list of restricted XPath ([XPath]) expressions. 
       */
      public StringList getFieldStrs();
  
      /**
       * [referenced key]: required if [identity-constraint category] is keyref, 
       * forbidden otherwise. An identity-constraint definition with [
       * identity-constraint category] equal to key or unique. 
       */
      public XSIDCDefinition getRefKey();
  
      /**
       * Optional. An [annotation]. 
       */
      public XSAnnotation getAnnotation();
  
  }
  
  
  
  1.1                  xml-xerces/java/src/org/apache/xerces/impl/xs/psvi/XSNamespaceItemList.java
  
  Index: XSNamespaceItemList.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.xerces.impl.xs.psvi;
  
  /**
   *  The <code>XSNamesaceItemList</code> interface provides the abstraction of 
   * an ordered collection of <code>XSNamespaceItem</code>s, without defining 
   * or constraining how this collection is implemented. 
   */
  public interface XSNamespaceItemList {
      /**
       *  The number of <code>XSNamespaceItem</code>s in the list. The range of 
       * valid child object indices is 0 to <code>length-1</code> inclusive. 
       */
      public int getLength();
  
      /**
       *  Returns the <code>index</code>th item in the collection. The index 
       * starts at 0. If <code>index</code> is greater than or equal to the 
       * number of objects in the list, this returns <code>null</code>. 
       * @param index  index into the collection. 
       * @return  The <code>XSNamespaceItem</code> at the <code>index</code>th 
       *   position in the <code>XSNamespaceItemList</code>, or 
       *   <code>null</code> if that is not a valid index. 
       */
      public XSNamespaceItem item(int index);
  
  }
  
  
  
  1.23      +15 -18    xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
  
  Index: XSDAbstractTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XSDAbstractTraverser.java	8 Nov 2002 16:04:29 -0000	1.22
  +++ XSDAbstractTraverser.java	14 Jan 2003 20:21:47 -0000	1.23
  @@ -57,30 +57,27 @@
   
   package org.apache.xerces.impl.xs.traversers;
   
  -import org.apache.xerces.impl.xs.util.XInt;
  -import org.apache.xerces.impl.dv.XSSimpleType;
  -import org.apache.xerces.impl.dv.XSFacets;
  +import java.util.Vector;
  +
   import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
  +import org.apache.xerces.impl.dv.XSFacets;
  +import org.apache.xerces.impl.dv.XSSimpleType;
  +import org.apache.xerces.impl.validation.ValidationState;
   import org.apache.xerces.impl.xs.SchemaGrammar;
   import org.apache.xerces.impl.xs.SchemaSymbols;
  -import org.apache.xerces.impl.xs.XSMessageFormatter;
  -import org.apache.xerces.impl.xs.XSNotationDecl;
   import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
   import org.apache.xerces.impl.xs.XSAttributeUseImpl;
  -import org.apache.xerces.impl.xs.XSWildcardDecl;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
   import org.apache.xerces.impl.xs.XSComplexTypeDecl;
   import org.apache.xerces.impl.xs.XSParticleDecl;
  +import org.apache.xerces.impl.xs.XSWildcardDecl;
   import org.apache.xerces.impl.xs.psvi.XSObjectList;
  -import org.apache.xerces.xni.QName;
  -import org.apache.xerces.util.SymbolTable;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
  +import org.apache.xerces.impl.xs.util.XInt;
  +import org.apache.xerces.util.DOMUtil;
   import org.apache.xerces.util.NamespaceSupport;
  -import org.apache.xerces.impl.validation.ValidationState;
  +import org.apache.xerces.util.SymbolTable;
  +import org.apache.xerces.xni.QName;
   import org.w3c.dom.Element;
  -import java.util.Hashtable;
  -import java.util.Vector;
  -import java.lang.reflect.*;
  -import org.apache.xerces.util.DOMUtil;
   
   /**
    * Class <code>XSDAbstractTraverser</code> serves as the base class for all
  @@ -385,7 +382,7 @@
           else if (type.getVariety() == XSSimpleType.VARIETY_UNION) {
               XSObjectList members = type.getMemberTypes();
               for (int i = 0; i < members.getLength(); i++) {
  -                if (containsQName((XSSimpleType)members.getItem(i)))
  +                if (containsQName((XSSimpleType)members.item(i)))
                       return true;
               }
           }
  @@ -439,7 +436,7 @@
                   XSAttributeUseImpl existingAttrUse = null, oneAttrUse;
                   int attrCount = attrUseS.getLength();
                   for (int i=0; i<attrCount; i++) {
  -                    oneAttrUse = (XSAttributeUseImpl)attrUseS.getItem(i);
  +                    oneAttrUse = (XSAttributeUseImpl)attrUseS.item(i);
                       existingAttrUse = attrGrp.getAttributeUse(oneAttrUse.fAttrDecl.getNamespace(),
                                                                 oneAttrUse.fAttrDecl.getName());
                       if (existingAttrUse == null) {
  @@ -505,7 +502,7 @@
        * Element/Attribute traversers call this method to check whether
        * the type is NOTATION without enumeration facet
        */
  -    void checkNotationType(String refName, XSTypeDecl typeDecl, Element elem) {
  +    void checkNotationType(String refName, XSTypeDefinition typeDecl, Element elem) {
           if (typeDecl.getTypeCategory() == typeDecl.SIMPLE_TYPE &&
               ((XSSimpleType)typeDecl).getVariety() == XSSimpleType.VARIETY_ATOMIC &&
               ((XSSimpleType)typeDecl).getPrimitiveKind() == XSSimpleType.PRIMITIVE_NOTATION) {
  
  
  
  1.20      +4 -4      xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
  
  Index: XSDAttributeTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XSDAttributeTraverser.java	18 Nov 2002 23:11:55 -0000	1.19
  +++ XSDAttributeTraverser.java	14 Jan 2003 20:21:47 -0000	1.20
  @@ -67,7 +67,6 @@
   import org.apache.xerces.impl.xs.XSAttributeDecl;
   import org.apache.xerces.impl.xs.XSAttributeUseImpl;
   import org.apache.xerces.impl.xs.XSElementDecl;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
   import org.apache.xerces.impl.xs.XSComplexTypeDecl;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.util.DOMUtil;
  @@ -75,6 +74,7 @@
   import org.apache.xerces.util.XMLSymbols;
   import org.apache.xerces.impl.xs.util.XInt;
   import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.impl.validation.ValidationState;
   import org.w3c.dom.Element;
   
  @@ -316,8 +316,8 @@
   
           // Handler type attribute
           if (attrType == null && typeAtt != null) {
  -            XSTypeDecl type = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, typeAtt, attrDecl);
  -            if (type != null && type.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE)
  +            XSTypeDefinition type = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, typeAtt, attrDecl);
  +            if (type != null && type.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE)
                   attrType = (XSSimpleType)type;
               else
                   reportSchemaError("src-resolve", new Object[]{typeAtt.rawname, "simpleType definition"}, attrDecl);
  
  
  
  1.27      +16 -18    xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
  
  Index: XSDComplexTypeTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XSDComplexTypeTraverser.java	9 Dec 2002 22:08:46 -0000	1.26
  +++ XSDComplexTypeTraverser.java	14 Jan 2003 20:21:47 -0000	1.27
  @@ -56,28 +56,26 @@
    */
   package org.apache.xerces.impl.xs.traversers;
   
  -import org.apache.xerces.impl.dv.XSSimpleType;
  +import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
   import org.apache.xerces.impl.dv.SchemaDVFactory;
   import org.apache.xerces.impl.dv.XSFacets;
  -import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
  -import org.apache.xerces.impl.xs.XSConstraints;
  +import org.apache.xerces.impl.dv.XSSimpleType;
   import org.apache.xerces.impl.xs.SchemaGrammar;
   import org.apache.xerces.impl.xs.SchemaSymbols;
  -import org.apache.xerces.impl.xs.XSComplexTypeDecl;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
   import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
   import org.apache.xerces.impl.xs.XSAttributeUseImpl;
  -import org.apache.xerces.impl.xs.XSWildcardDecl;
  -import org.apache.xerces.impl.xs.XSParticleDecl;
  +import org.apache.xerces.impl.xs.XSComplexTypeDecl;
  +import org.apache.xerces.impl.xs.XSConstraints;
   import org.apache.xerces.impl.xs.XSModelGroupImpl;
  -import org.apache.xerces.util.DOMUtil;
  -import org.apache.xerces.impl.xs.util.XInt;
  -import org.apache.xerces.impl.xs.util.XIntPool;
  +import org.apache.xerces.impl.xs.XSParticleDecl;
  +import org.apache.xerces.impl.xs.XSWildcardDecl;
   import org.apache.xerces.impl.xs.psvi.XSConstants;
   import org.apache.xerces.impl.xs.psvi.XSObjectList;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
  +import org.apache.xerces.impl.xs.util.XInt;
  +import org.apache.xerces.util.DOMUtil;
   import org.apache.xerces.xni.QName;
   import org.w3c.dom.Element;
  -import java.util.Hashtable;
   
   /**
    * A complex type definition schema component traverser.
  @@ -109,7 +107,7 @@
       private short fFinal = XSConstants.DERIVATION_NONE;
       private short fBlock = XSConstants.DERIVATION_NONE;
       private short fContentType = XSComplexTypeDecl.CONTENTTYPE_EMPTY;
  -    private XSTypeDecl fBaseType = null;
  +    private XSTypeDefinition fBaseType = null;
       private XSAttributeGroupDecl fAttrGrp = null;
       private XSSimpleType fXSSimpleType = null;
       private XSParticleDecl fParticle = null;
  @@ -384,7 +382,7 @@
                               new Object[]{fName}, simpleContent);
           }
   
  -        XSTypeDecl type = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc,
  +        XSTypeDefinition type = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc,
                                         XSDHandler.TYPEDECL_TYPE, baseTypeName,
                                         simpleContent);
           if (type==null)
  @@ -397,7 +395,7 @@
           int baseFinalSet = 0;
   
           // If the base type is complex, it must have simpleContent
  -        if ((type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE)) {
  +        if ((type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)) {
   
               baseComplexType = (XSComplexTypeDecl)type;
               if (baseComplexType.getContentType() != XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
  @@ -638,7 +636,7 @@
                         new Object[]{fName}, complexContent);
           }
   
  -        XSTypeDecl type = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc,
  +        XSTypeDefinition type = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc,
                                                                      XSDHandler.TYPEDECL_TYPE,
                                                                      baseTypeName,
                                                                      complexContent);
  @@ -800,7 +798,7 @@
           XSAttributeUseImpl existingAttrUse, duplicateAttrUse =  null, oneAttrUse;
           int attrCount = attrUseS.getLength();
           for (int i=0; i<attrCount; i++) {
  -            oneAttrUse = (XSAttributeUseImpl)attrUseS.getItem(i);
  +            oneAttrUse = (XSAttributeUseImpl)attrUseS.item(i);
               existingAttrUse = toAttrGrp.getAttributeUse(oneAttrUse.fAttrDecl.getNamespace(),
                                                           oneAttrUse.fAttrDecl.getName());
               if (existingAttrUse == null) {
  @@ -1031,7 +1029,7 @@
           fXSSimpleType = (XSSimpleType)fGlobalStore[--fGlobalStorePos];
           fParticle = (XSParticleDecl)fGlobalStore[--fGlobalStorePos]; 
           fAttrGrp = (XSAttributeGroupDecl)fGlobalStore[--fGlobalStorePos];
  -        fBaseType = (XSTypeDecl)fGlobalStore[--fGlobalStorePos];
  +        fBaseType = (XSTypeDefinition)fGlobalStore[--fGlobalStorePos];
           int i = ((Integer)(fGlobalStore[--fGlobalStorePos])).intValue();
           fBlock = (short)(i >> 16);
           fContentType = (short)i;
  
  
  
  1.19      +12 -14    xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDElementTraverser.java
  
  Index: XSDElementTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDElementTraverser.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XSDElementTraverser.java	18 Jul 2002 20:48:44 -0000	1.18
  +++ XSDElementTraverser.java	14 Jan 2003 20:21:48 -0000	1.19
  @@ -57,23 +57,21 @@
   
   package org.apache.xerces.impl.xs.traversers;
   
  -import org.apache.xerces.impl.dv.XSSimpleType;
   import org.apache.xerces.impl.dv.ValidatedInfo;
  -import org.apache.xerces.impl.dv.ValidationContext;
  -import org.apache.xerces.impl.xs.XSConstraints;
  +import org.apache.xerces.impl.dv.XSSimpleType;
   import org.apache.xerces.impl.xs.SchemaGrammar;
   import org.apache.xerces.impl.xs.SchemaSymbols;
  +import org.apache.xerces.impl.xs.XSComplexTypeDecl;
  +import org.apache.xerces.impl.xs.XSConstraints;
   import org.apache.xerces.impl.xs.XSElementDecl;
   import org.apache.xerces.impl.xs.XSParticleDecl;
  -import org.apache.xerces.impl.xs.XSComplexTypeDecl;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
  -import org.apache.xerces.util.DOMUtil;
  -import org.apache.xerces.impl.xs.util.XInt;
  -import org.apache.xerces.impl.xs.util.XIntPool;
   import org.apache.xerces.impl.xs.psvi.XSConstants;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
  +import org.apache.xerces.impl.xs.util.XInt;
  +import org.apache.xerces.util.DOMUtil;
   import org.apache.xerces.util.SymbolTable;
   import org.apache.xerces.xni.QName;
  -import  org.w3c.dom.Element;
  +import org.w3c.dom.Element;
   
   /**
    * The element declaration schema component traverser.
  @@ -324,7 +322,7 @@
           }
   
           // get 'type definition'
  -        XSTypeDecl elementType = null;
  +        XSTypeDefinition elementType = null;
           boolean haveAnonType = false;
   
           // Handle Anonymous type if there is one
  @@ -345,7 +343,7 @@
   
           // Handler type attribute
           if (elementType == null && typeAtt != null) {
  -            elementType = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, typeAtt, elmDecl);
  +            elementType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, typeAtt, elmDecl);
           }
   
           // Get it from the substitutionGroup declaration
  @@ -458,9 +456,9 @@
   
           // 4 If the {type definition} or {type definition}'s {content type} is or is derived from ID then there must not be a {value constraint}.
           if (element.fDefault != null) {
  -            if ((elementType.getTypeCategory() == XSTypeDecl.SIMPLE_TYPE &&
  +            if ((elementType.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE &&
                    ((XSSimpleType)elementType).isIDType()) ||
  -                (elementType.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE &&
  +                (elementType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE &&
                    ((XSComplexTypeDecl)elementType).containsTypeID())) {
                   reportSchemaError ("e-props-correct.4", new Object[]{element.fName}, elmDecl);
               }
  
  
  
  1.20      +12 -22    xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java
  
  Index: XSDSimpleTypeTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XSDSimpleTypeTraverser.java	11 Nov 2002 19:08:44 -0000	1.19
  +++ XSDSimpleTypeTraverser.java	14 Jan 2003 20:21:48 -0000	1.20
  @@ -57,31 +57,21 @@
   
   package org.apache.xerces.impl.xs.traversers;
   
  +import java.util.Vector;
  +
  +import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
   import org.apache.xerces.impl.dv.SchemaDVFactory;
   import org.apache.xerces.impl.dv.XSSimpleType;
  -import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
  -import org.apache.xerces.impl.dv.XSFacets;
  +import org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl;
   import org.apache.xerces.impl.xs.SchemaGrammar;
   import org.apache.xerces.impl.xs.SchemaSymbols;
  -import org.apache.xerces.impl.xs.XSTypeDecl;
   import org.apache.xerces.impl.xs.psvi.XSConstants;
   import org.apache.xerces.impl.xs.psvi.XSObjectList;
  -import org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl;
  -
  -import org.apache.xerces.util.DOMUtil;
  +import org.apache.xerces.impl.xs.psvi.XSTypeDefinition;
   import org.apache.xerces.impl.xs.util.XInt;
  -import org.apache.xerces.impl.xs.util.XIntPool;
  +import org.apache.xerces.util.DOMUtil;
   import org.apache.xerces.xni.QName;
  -import org.apache.xerces.util.NamespaceSupport;
  -
   import org.w3c.dom.Element;
  -import org.w3c.dom.Attr;
  -import org.w3c.dom.Node;
  -
  -import java.lang.reflect.*;
  -import java.util.Hashtable;
  -import java.util.Vector;
  -import java.util.StringTokenizer;
   
   /**
    * The simple type definition schema component traverser.
  @@ -274,7 +264,7 @@
                       if (dv.getVariety() == XSSimpleType.VARIETY_UNION) {
                           dvs = dv.getMemberTypes();
                           for (int j = 0; j < dvs.getLength(); j++)
  -                            dTValidators.addElement(dvs.getItem(j));
  +                            dTValidators.addElement(dvs.item(j));
                       } else {
                           dTValidators.addElement(dv);
                       }
  @@ -313,7 +303,7 @@
                           if (dv.getVariety() == XSSimpleType.VARIETY_UNION) {
                               dvs = dv.getMemberTypes();
                               for (int j = 0; j < dvs.getLength(); j++)
  -                                dTValidators.addElement(dvs.getItem(j));
  +                                dTValidators.addElement(dvs.item(j));
                           } else {
                               dTValidators.addElement(dv);
                           }
  @@ -415,10 +405,10 @@
           if (baseTypeStr == null)
               return null;
   
  -        XSTypeDecl baseType = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, fSchemaHandler.TYPEDECL_TYPE, baseTypeStr, elm);
  +        XSTypeDefinition baseType = (XSTypeDefinition)fSchemaHandler.getGlobalDecl(schemaDoc, fSchemaHandler.TYPEDECL_TYPE, baseTypeStr, elm);
           if (baseType != null) {
               // if it's a complex type, or if its restriction of anySimpleType
  -            if (baseType.getTypeCategory() != XSTypeDecl.SIMPLE_TYPE ||
  +            if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE ||
                   baseType == SchemaGrammar.fAnySimpleType &&
                   baseRefContext == XSConstants.DERIVATION_RESTRICTION) {
                   // if the base type is anySimpleType and the current type is
  @@ -464,7 +454,7 @@
           if (validator.getVariety() == XSSimpleType.VARIETY_UNION) {
               XSObjectList temp = validator.getMemberTypes();
               for (int i = 0; i < temp.getLength(); i++) {
  -                if (((XSSimpleType)temp.getItem(i)).getVariety() == XSSimpleType.VARIETY_LIST) {
  +                if (((XSSimpleType)temp.item(i)).getVariety() == XSSimpleType.VARIETY_LIST) {
                       return true;
                   }
               }
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/util/StringListImpl.java
  
  Index: StringListImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/util/StringListImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringListImpl.java	17 Jun 2002 18:41:46 -0000	1.1
  +++ StringListImpl.java	14 Jan 2003 20:21:48 -0000	1.2
  @@ -83,7 +83,7 @@
       }
   
       /**
  -     * Construct an ObjectList implementation
  +     * Construct an XSObjectList implementation
        * 
        * @param array     the data array
        * @param length    the number of elements
  
  
  
  1.3       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/xs/util/XSNamedMapImpl.java
  
  Index: XSNamedMapImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/util/XSNamedMapImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSNamedMapImpl.java	21 May 2002 21:41:50 -0000	1.2
  +++ XSNamedMapImpl.java	14 Jan 2003 20:21:48 -0000	1.3
  @@ -156,7 +156,7 @@
        *   name and namespace URI, or <code>null</code> if they do not
        *   identify any <code>XSObject</code> in this map.
        */
  -    public XSObject getNSItem(String namespace, String localName) {
  +    public XSObject itemByName(String namespace, String localName) {
           if (namespace != null)
               namespace = namespace.intern();
           for (int i = 0; i < fNSNum; i++) {
  @@ -189,7 +189,7 @@
        *   in the <code>XSNamedMap</code>, or <code>null</code> if that is
        *   not a valid index.
        */
  -    public synchronized XSObject getItem(int index) {
  +    public synchronized XSObject item(int index) {
           if (fArray == null) {
               // calculate the total number of elements
               getMapLength();
  
  
  
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/util/XSObjectListImpl.java
  
  Index: XSObjectListImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/util/XSObjectListImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XSObjectListImpl.java	17 Jun 2002 18:41:46 -0000	1.2
  +++ XSObjectListImpl.java	14 Jan 2003 20:21:48 -0000	1.3
  @@ -102,7 +102,7 @@
        *   <code>XSObjectList</code>, or <code>null</code> if that is not a
        *   valid index.
        */
  -    public XSObject getItem(int index) {
  +    public XSObject item(int index) {
           if (index < 0 || index >= fLength)
               return null;
           return fArray[index];
  
  
  
  1.1                  xml-xerces/java/src/org/apache/xerces/impl/xs/util/NSItemListImpl.java
  
  Index: NSItemListImpl.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.xerces.impl.xs.util;
  
  import org.apache.xerces.impl.xs.psvi.XSNamespaceItem;
  import org.apache.xerces.impl.xs.psvi.XSNamespaceItemList;
  import org.apache.xerces.impl.xs.psvi.XSObject;
  import org.apache.xerces.impl.xs.psvi.XSObjectList;
  import java.util.Vector;
  /**
   * Containts a list of Object's.
   *
   * @author Sandy Gao, IBM
   *
   * @version $Id: NSItemListImpl.java,v 1.1 2003/01/14 20:21:48 elena Exp $
   */
  public class NSItemListImpl implements XSNamespaceItemList {
  
      // The array to hold all data
      private XSNamespaceItem[] fArray = null;
      // Number of elements in this list
      private int fLength = 0;
  
      // REVISIT: this is temp solution. In general we need to use this class
      //          instead of the Vector.
      private Vector fVector;
  
      public NSItemListImpl(Vector v) {
          fVector = v;        
          fLength = v.size();
      }
  
      /**
       * Construct an XSNamespaceItemList implementation
       * 
       * @param array     the data array
       * @param length    the number of elements
       */
      public NSItemListImpl(XSNamespaceItem[] array, int length) {
          fArray = array;
          fLength = length;
      }
  
      /**
       * The number of <code>Objects</code> in the list. The range of valid
       * child node indices is 0 to <code>length-1</code> inclusive.
       */
      public int getLength() {
          return fLength;
      }
  
      public XSNamespaceItem item(int index) {
          if (index < 0 || index >= fLength)
              return null;
          if (fVector != null) {
              return (XSNamespaceItem)fVector.elementAt(index);
          }
          return fArray[index];
      }
  
  } // class XSParticle
  
  
  

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