Hi Arun,

I've applied the part of your patch that returns the value of the
schema-full-checking feature instead of throwing a SAXException.  I didn't
apply the other parts of the patch, because I'm not persuaded that simply
because a feature isn't documented it should be eliminated from the source.
Some features--like that for normalizing element values--might be useful in
the future, and if we have them partially implemented we're slightly ahead
of where we would have been if they weren't implemented at all (so long as
the code's clearly commented to the effect that the features aren't ready
to be used by general users).  If it doesn't hurt performance, people are
at their own risk if they muck about in the source to find stuff that isn't
documented.

also, I have to note that your patch was taken against the XMLParser class
that was distributed with Xerces 1.4.3.  This makes incorporating the
changes into CVS very difficult, since the patch has to be modified to make
it applicable to the current source.  So it would make things a lot easier
for us who have to apply patches if they could be made against current
code.

Thanks,
Neil

Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]



Arun Yadav <[EMAIL PROTECTED]> on 11/13/2001 10:31:10 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  patch for XMLParser[xerces1.4.3]




Hi

Please find the patch for class XMLParser.

Exception was being thrown for feature "
http://apache.org/xml/features/validation/schema-full-checking"; , when
tries to
get
the value of feature.

Following features are not documented in Feature List.
http://apache.org/xml/features/validation/default-attribute-values
http://apache.org/xml/features/validation/validate-content-models
http://apache.org/xml/features/validation/validate-datatypes


Cheers,
Arun.

Sun Microsystem, Inc.
Index: XMLParser.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/framework/Attic/XMLParser.java,v

retrieving revision 1.33
diff -u -w -r1.33 XMLParser.java
--- XMLParser.java        2001/06/25 18:07:51            1.33
+++ XMLParser.java        2001/11/13 11:18:19
@@ -126,9 +126,6 @@
         "http://apache.org/xml/features/validation/schema";,
         "http://apache.org/xml/features/validation/schema-full-checking";,
         "http://apache.org/xml/features/validation/dynamic";,
-        "
http://apache.org/xml/features/validation/default-attribute-values";,
-        "http://apache.org/xml/features/validation/validate-content-models
",
-        "http://apache.org/xml/features/validation/validate-datatypes";,
         "
http://apache.org/xml/features/validation/warn-on-duplicate-attdef";,
         "
http://apache.org/xml/features/validation/warn-on-undeclared-elemdef";,
         "http://apache.org/xml/features/allow-java-encodings";,
@@ -1337,26 +1334,12 @@
                 return;
             }
             //
-            //
http://apache.org/xml/features/validation/default-attribute-values
-            //
-            if (feature.equals("validation/default-attribute-values")) {
-                // REVISIT
-                throw new SAXNotSupportedException(featureId);
-            }
-            //
             //
http://apache.org/xml/features/validation/normalize-attribute-values
             //
             if (feature.equals("validation/normalize-attribute-values")) {
                 setNormalizeAttributeValues(state);
             }
             //
-            //
http://apache.org/xml/features/validation/validate-content-models
-            //
-            if (feature.equals("validation/validate-content-models")) {
-                // REVISIT
-                throw new SAXNotSupportedException(featureId);
-            }
-            //
             //
http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
             //
             if (feature.equals("nonvalidating/load-dtd-grammar")) {
@@ -1370,14 +1353,6 @@
                 setLoadExternalDTD(state);
                 return;
             }
-
-            //
-            //
http://apache.org/xml/features/validation/default-attribute-values
-            //
-            if (feature.equals("validation/validate-datatypes")) {
-                // REVISIT
-                throw new SAXNotSupportedException(featureId);
-            }
             //
             //
http://apache.org/xml/features/validation/warn-on-duplicate-attdef
             //   Emits an error when an attribute is redefined.
@@ -1498,6 +1473,13 @@
                 return getValidationSchema();
             }
             //
+            //
http://apache.org/xml/features/validation/schema-full-checking
+            //   Lets the user turn Schema full constraint checking
on/off.
+            //
+            if (feature.equals("validation/schema-full-checking")) {
+                return getValidationSchemaFullChecking();
+            }
+            //
             // http://apache.org/xml/features/validation/dynamic
             //   Allows the parser to validate a document only when it
             //   contains a grammar. Validation is turned on/off based
@@ -1507,20 +1489,6 @@
                 return getValidationDynamic();
             }
             //
-            //
http://apache.org/xml/features/validation/default-attribute-values
-            //
-            if (feature.equals("validation/default-attribute-values")) {
-                // REVISIT
-                throw new SAXNotRecognizedException(featureId);
-            }
-            //
-            //
http://apache.org/xml/features/validation/validate-content-models
-            //
-            if (feature.equals("validation/validate-content-models")) {
-                // REVISIT
-                throw new SAXNotRecognizedException(featureId);
-            }
-            //
             //
http://apache.org/xml/features/nonvalidating/load-dtd-grammar
             //
             if (feature.equals("nonvalidating/load-dtd-grammar")) {
@@ -1533,13 +1501,6 @@
                 return getLoadExternalDTD();
             }
             //
-            //
http://apache.org/xml/features/validation/validate-datatypes
-            //
-            if (feature.equals("validation/validate-datatypes")) {
-                // REVISIT
-                throw new SAXNotRecognizedException(featureId);
-            }
-            //
             //
http://apache.org/xml/features/validation/warn-on-duplicate-attdef
             //   Emits an error when an attribute is redefined.
             //
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to