You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2002/04/08 21:54:15 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs XSAttributeGroupDecl.java
sandygao 02/04/08 12:54:15
Modified: java/src/org/apache/xerces/impl/xs XSAttributeGroupDecl.java
Log:
Should remove attribute uses that have the same name+namespace as
an attribute use with use=prohibited.
Revision Changes Path
1.8 +4 -3 xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
Index: XSAttributeGroupDecl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XSAttributeGroupDecl.java 3 Apr 2002 23:48:26 -0000 1.7
+++ XSAttributeGroupDecl.java 8 Apr 2002 19:54:15 -0000 1.8
@@ -66,7 +66,7 @@
* @author Sandy Gao, IBM
* @author Rahul Srivastava, Sun Microsystems Inc.
*
- * @version $Id: XSAttributeGroupDecl.java,v 1.7 2002/04/03 23:48:26 elena Exp $
+ * @version $Id: XSAttributeGroupDecl.java,v 1.8 2002/04/08 19:54:15 sandygao Exp $
*/
public class XSAttributeGroupDecl {
@@ -121,6 +121,7 @@
}
public void removeProhibitedAttrs() {
+ if (fAttrUseNum == 0) return;
int pCount = 0;
XSAttributeUse[] pUses = new XSAttributeUse[fAttrUseNum];
for (int i = 0; i < fAttrUseNum; i++) {
@@ -135,13 +136,13 @@
int newCount = 0;
if (pCount > 0) {
- for (int i = 0; i < fAttrUseNum; i++) {
+ OUTER: for (int i = 0; i < fAttrUseNum; i++) {
if (fAttributeUses[i].fUse == SchemaSymbols.USE_PROHIBITED)
continue;
for (int j = 1; j <= pCount; j++) {
if (fAttributeUses[i].fAttrDecl.fName == pUses[fAttrUseNum-pCount].fAttrDecl.fName &&
fAttributeUses[i].fAttrDecl.fTargetNamespace == pUses[fAttrUseNum-pCount].fAttrDecl.fTargetNamespace) {
- continue;
+ continue OUTER;
}
}
pUses[newCount++] = fAttributeUses[i];
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org