You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/06/05 23:50:31 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl/dv/xs XSSimpleTypeDecl.java

neilg       2003/06/05 14:50:31

  Modified:    java/src/org/apache/xerces/impl/dv ValidationContext.java
               java/src/org/apache/xerces/impl/validation
                        ValidationState.java
               java/src/org/apache/xerces/impl/dv/xs XSSimpleTypeDecl.java
  Log:
  in order to be namespace-valid, attributes of type ID/IDREF/IDREFS must be NCNames.  Thus, ValidationContext must be able to describe whether namespace processing is enabled.
  
  Revision  Changes    Path
  1.3       +4 -1      xml-xerces/java/src/org/apache/xerces/impl/dv/ValidationContext.java
  
  Index: ValidationContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/ValidationContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ValidationContext.java	9 Aug 2002 15:18:17 -0000	1.2
  +++ ValidationContext.java	5 Jun 2003 21:50:30 -0000	1.3
  @@ -74,6 +74,9 @@
       // whether we need to normalize the value that is passed!
       public boolean needToNormalize();
   
  +    // are namespaces relevant in this context?
  +    public boolean useNamespaces();
  +
       // entity
       public boolean isEntityDeclared (String name);
       public boolean isEntityUnparsed (String name);
  
  
  
  1.13      +11 -1     xml-xerces/java/src/org/apache/xerces/impl/validation/ValidationState.java
  
  Index: ValidationState.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/ValidationState.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ValidationState.java	24 Sep 2002 23:05:17 -0000	1.12
  +++ ValidationState.java	5 Jun 2003 21:50:30 -0000	1.13
  @@ -79,6 +79,7 @@
       private boolean fExtraChecking              = true;
       private boolean fFacetChecking              = true;
       private boolean fNormalize                  = true;
  +    private boolean fNamespaces                 = true;
   
       private EntityState fEntityState            = null;
       private NamespaceContext fNamespaceContext  = null;
  @@ -104,6 +105,10 @@
             fNormalize = newValue;
       }
   
  +    public void setUsingNamespaces (boolean newValue) {
  +          fNamespaces = newValue;
  +    }
  +
       public void setEntityState(EntityState state) {
           fEntityState = state;
       }
  @@ -136,6 +141,7 @@
       public void reset () {
           fExtraChecking = true;
           fFacetChecking = true;
  +        fNamespaces = true;
           fIdTable.clear();
           fIdRefTable.clear();
           fEntityState = null;
  @@ -170,6 +176,10 @@
   
       public boolean needToNormalize (){
           return fNormalize;
  +    }
  +
  +    public boolean useNamespaces() {
  +        return fNamespaces;
       }
   
       // entity
  
  
  
  1.36      +11 -1     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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- XSSimpleTypeDecl.java	17 Mar 2003 15:00:31 -0000	1.35
  +++ XSSimpleTypeDecl.java	5 Jun 2003 21:50:30 -0000	1.36
  @@ -203,6 +203,9 @@
           public boolean needToNormalize() {
               return true;
           }
  +        public boolean useNamespaces () {
  +            return true;
  +        }
           public boolean isEntityDeclared (String name) {
               return false;
           }
  @@ -2092,6 +2095,9 @@
           public boolean needToNormalize() {
               return false;
           }
  +        public boolean useNamespaces() {
  +            return true;
  +        }
   
           public boolean isEntityDeclared(String name) {
               return false;
  @@ -2144,6 +2150,10 @@
           }
           public boolean needToNormalize() {
               return fExternal.needToNormalize();
  +        }
  +        // schema validation is predicated upon namespaces
  +        public boolean useNamespaces() {
  +            return true;
           }
   
           public boolean isEntityDeclared (String name) {
  
  
  

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