Please find the attached diff for XSDAbstractTraverser
Pavani
--
Pavani Mukthipudi
Sun Microsystems Inc.
Phone: 080 - 2298989 Extn: 87390
Index: XSDAbstractTraverser.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/v2/XSDAbstractTraverser.java,v
retrieving revision 1.20
diff -u -r1.20 XSDAbstractTraverser.java
--- XSDAbstractTraverser.java 2001/09/25 22:46:07 1.20
+++ XSDAbstractTraverser.java 2001/09/27 13:51:14
@@ -232,13 +232,42 @@
// false if must have some element (with possible preceding
<annotation?>)
//
- //REVISIT: Implement
//REVISIT: if we want to expose annotation information to the application,
// then we should never call this method. different traversers
// should call traverseAnnotationDecl() directly, and store the
// returned value.
Element checkContent( Element elm, Element content, boolean isEmpty ) {
- return content;
+
+ if (content == null) {
+ return content;
+ }
+
+ if (content.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) {
+ Document doc = DOMUtil.getDocument(content);
+ XSDocumentInfo docInfo = fSchemaHandler.fDoc2XSDocumentMap(doc);
+ boolean isGlobal = false;
+
+ if
+(DOMUtil.getParent(elm).getLocalName().equals(SchemaSymbols.ELT_SCHEMA))
+ isGlobal = true;
+
+ Object[] parentAttrs = fAttrChecker.checkAttributes(elm, isGlobal,
+docInfo);
+
+ traverseAnnotationDecl(content, parentAttrs, false, docInfo);
+
+ fAttrChecker.returnAttrArray(parentAttrs, docInfo);
+ content = DOMUtil.getNextSiblingElement(content);
+
+ // REVISIT : should we make these checks here ??
+
+ if (content == null && !isEmpty) {
+ // report error
+ }
+ else if (content != null && isEmpty) {
+ // report error
+ }
+ }
+
+ return content;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]