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 Khaled Noaman <kn...@ca.ibm.com> on 2003/03/18 15:19:24 UTC

redefine patch

Hi,

The following patch will resolve bugzilla bugs 16579, 16639,  and 16702.

Regards,
Khaled

---
D:\cvswork\xml-xerces\java\src\org\apache\xerces\impl\xs\traversers\XSDHandler.java
2003-02-14 10:25:03.000000000 -0500
+++ XSDHandler.java 2003-02-25 16:58:56.000000000 -0500
@@ -1650,6 +1650,14 @@
                 collidedWithRedefine = false;
             }
             if (redefinedSchema != null) { //redefinition involved
somehow
+                // If both components belong to the same document then
+                // report an error and return.
+                if
(fDoc2XSDocumentMap.get(DOMUtil.getDocument(collidingElem)) ==
currSchema) {
+
+                    reportSchemaError("sch-props-correct.2", new Object
[]{qName}, currComp);
+                    return;
+                }
+
                 String newName =
qName.substring(qName.lastIndexOf(',')+1)+REDEF_IDENTIFIER;
                 if (redefinedSchema == currSchema) { // object comp.
okay here
                     // now have to do some renaming...


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