You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Pavani Mukthipudi <Pa...@Sun.COM> on 2001/08/28 07:07:43 UTC

patch for Bug# 2093 Dynamic Validation and XML Schema

cvs server: Diffing .
Index: XMLValidator.java
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/validators/common/Attic/XM
LValidator.java,v
retrieving revision 1.186
diff -c -r1.186 XMLValidator.java
*** XMLValidator.java   2001/08/09 19:21:49     1.186
--- XMLValidator.java   2001/08/28 05:01:25
***************
*** 1151,1156 ****
--- 1151,1161 ----
        if (fNamespacesEnabled) {
           bindNamespacesToElementAndAttributes(element, fAttrList);
        }
+ 
+       // modified
+       if (fDynamicValidation && fGrammar==null) {
+                fValidating = false;
+       }
  
        if (!fSeenRootElement) {
            fSeenRootElement = true;
***************
*** 2413,2422 ****
           if (fGrammar == null) {
  
              fGrammar = fGrammarResolver.getGrammar("");
-             if (fDynamicValidation && fGrammar==null) {
-                fValidating = false;
-             }
  
              if (fGrammar != null) {
                 if (fGrammar instanceof DTDGrammar) {
                    fGrammarIsDTDGrammar = true;
--- 2418,2431 ----
           if (fGrammar == null) {
  
              fGrammar = fGrammarResolver.getGrammar("");
  
+           // Schema file is not yet parsed.This check should be done after the 
method
+             // bindNamespacesToElementAndAttributes() is called.
+ 
+             // if (fDynamicValidation && fGrammar==null) {
+             //   fValidating = false;
+             // }
+          
              if (fGrammar != null) {
                 if (fGrammar instanceof DTDGrammar) {
                    fGrammarIsDTDGrammar = true;



-- 

Pavani Mukthipudi
Sun Microsystems Inc.

Phone: 080 - 2298989   Extn: 87390


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


Re: patch for Bug# 2093 Dynamic Validation and XML Schema

Posted by Elena Litani <el...@ca.ibm.com>.
Applied your patch. Thanks for your help! 

Can you verify the patch and close the bug in Bugzilla?


Elena.


Pavani Mukthipudi wrote:
> 
> cvs server: Diffing .
> Index: XMLValidator.java
> ===================================================================
> RCS file:
> /home/cvspublic/xml-xerces/java/src/org/apache/xerces/validators/common/Attic/XM
> LValidator.java,v
> retrieving revision 1.186
> diff -c -r1.186 XMLValidator.java
> *** XMLValidator.java   2001/08/09 19:21:49     1.186
> --- XMLValidator.java   2001/08/28 05:01:25
> ***************
> *** 1151,1156 ****
> --- 1151,1161 ----
>         if (fNamespacesEnabled) {
>            bindNamespacesToElementAndAttributes(element, fAttrList);
>         }
> +
> +       // modified
> +       if (fDynamicValidation && fGrammar==null) {
> +                fValidating = false;
> +       }
> 
>         if (!fSeenRootElement) {
>             fSeenRootElement = true;
> ***************
> *** 2413,2422 ****
>            if (fGrammar == null) {
> 
>               fGrammar = fGrammarResolver.getGrammar("");
> -             if (fDynamicValidation && fGrammar==null) {
> -                fValidating = false;
> -             }
> 
>               if (fGrammar != null) {
>                  if (fGrammar instanceof DTDGrammar) {
>                     fGrammarIsDTDGrammar = true;
> --- 2418,2431 ----
>            if (fGrammar == null) {
> 
>               fGrammar = fGrammarResolver.getGrammar("");
> 
> +           // Schema file is not yet parsed.This check should be done after the
> method
> +             // bindNamespacesToElementAndAttributes() is called.
> +
> +             // if (fDynamicValidation && fGrammar==null) {
> +             //   fValidating = false;
> +             // }
> +
>               if (fGrammar != null) {
>                  if (fGrammar instanceof DTDGrammar) {
>                     fGrammarIsDTDGrammar = true;
> 
> --
> 
> Pavani Mukthipudi
> Sun Microsystems Inc.
> 
> Phone: 080 - 2298989   Extn: 87390
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

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