Hi,
Please find attached patch for class XSAttributeGroupDecl.
Added method getAttributeUse(uri,localpart).
Cheers,
Rahul.
Sun Microsystems, Inc.
XSAttributeGroupDecl.java
Index: XSAttributeGroupDecl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/v2/XSAttributeGroupDecl.java,v
retrieving revision 1.4
diff -u -w -r1.4 XSAttributeGroupDecl.java
--- XSAttributeGroupDecl.java 2001/09/25 18:50:11 1.4
+++ XSAttributeGroupDecl.java 2001/10/04 08:44:45
@@ -64,6 +64,8 @@
* schema component is a global <attributeGroup> element information item
*
* @author Sandy Gao, IBM
+ * @author Rahul Srivastava, Sun Microsystems Inc.
+ *
* @version $Id: XSAttributeGroupDecl.java,v 1.4 2001/09/25 18:50:11 sandygao Exp $
*/
public class XSAttributeGroupDecl {
@@ -91,8 +93,16 @@
attrUse.fAttrDecl.fType instanceof IDDatatypeValidator) {
fIDAttrName = attrUse.fAttrDecl.fName;
}
- //REVISIT: while adding check for duplicate attribute use.
- //This will take care of union of attributeUse(s).
+ }
+
+ public XSAttributeUse getAttributeUse(String uri, String localpart) {
+ for (int i=0; i<fAttributeUseNum; i++) {
+ if ( (fAttributeUses[i].fAttrDecl.fTargetNamespace == uri) &&
+ (fAttributeUses[i].fAttrDecl.fName == localpart) )
+ return fAttributeUses[i];
+ }
+
+ return null;
}
public XSAttributeUse[] getAttributeUses() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]