mrglavas 2004/04/29 19:42:43 Modified: java/src/org/apache/xerces/impl/xs/opti SchemaDOMParser.java Log: Fixing a NPE which occured for any schema containing a CDATA
section outside of an annotation. Revision Changes Path 1.8 +9 -3 xml-xerces/java/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java Index: SchemaDOMParser.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- SchemaDOMParser.java 24 Feb 2004 22:59:11 -0000 1.7 +++ SchemaDOMParser.java 30 Apr 2004 02:42:43 -0000 1.8 @@ -337,7 +337,10 @@ * Thrown by handler to signal an error. */ public void startCDATA(Augmentations augs) throws XNIException { - schemaDOM.startAnnotationCDATA(); + // only deal with CDATA boundaries within an annotation. + if (fAnnotationDepth != -1) { + schemaDOM.startAnnotationCDATA(); + } } /** @@ -349,7 +352,10 @@ * Thrown by handler to signal an error. */ public void endCDATA(Augmentations augs) throws XNIException { - schemaDOM.endAnnotationCDATA(); + // only deal with CDATA boundaries within an annotation. + if (fAnnotationDepth != -1) { + schemaDOM.endAnnotationCDATA(); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]