ankitp 2005/01/14 13:31:37 Modified: java/src/org/apache/xerces/impl/xs/opti SchemaDOMParser.java Log: bug fixes for 'generate synthetic annotations' Revision Changes Path 1.17 +4 -4 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.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- SchemaDOMParser.java 20 Dec 2004 04:53:23 -0000 1.16 +++ SchemaDOMParser.java 14 Jan 2005 21:31:37 -0000 1.17 @@ -232,7 +232,7 @@ fAnnotationDepth = fDepth; schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } - else if (fGenerateSyntheticAnnotation) { + else if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { fSawAnnotation.push(false); fHasNonSchemaAttributes.push(hasNonSchemaAttributes(element, attributes)); } @@ -266,7 +266,7 @@ throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && - element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && hasNonSchemaAttributes(element, attributes)) { + element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), @@ -351,7 +351,7 @@ schemaDOM.endAnnotationElement(element, false); } } else { // not in an annotation at all - if(fGenerateSyntheticAnnotation) { + if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]