Examples of XSAttributeGroupDecl


Examples of org.apache.xerces.impl.xs.XSAttributeGroupDecl

                    QName aname = new QName(); // REVISIT: cache this

                    // Get the list of attributes from the element decl.
                    // REVISIT - is this correct?   This is what was done in xerces-1,
                    // but is it right?
                    XSAttributeGroupDecl attrGrp = null;
                    if (elementDecl != null) {
                        XSTypeDecl type = elementDecl.fType;
                        if (type != null) {
                          if (type.getTypeCategory() == XSTypeDecl.COMPLEX_TYPE) {
                            XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;
                            attrGrp = ctype.getAttrGrp();
                          }
                        }
                    }

                    for (int aIndex = 0; aIndex < attrCount; aIndex++) {
                        attributes.getName(aIndex, aname);
                        if (nodeTest.type != XPath.NodeTest.QNAME ||
                            nodeTest.name.equals(aname)) {
                            fCurrentStep[i]++;
                            if (fCurrentStep[i] == steps.length) {
                                fMatched[i] = MATCHED_ATTRIBUTE;
                                int j=0;
                                for(; j<i && ((fMatched[j] & MATCHED) != MATCHED); j++);
                                if(j==i) {
                                    String avalue = attributes.getValue(aIndex);
                                    fMatchedString = avalue;

                                    // find Datatype validator...
                                    XSSimpleType aValidator = null;
                                    if (attrGrp != null) {
                                      XSAttributeUseImpl tempAttUse = attrGrp.getAttributeUse(aname.uri, aname.localpart);
                                      if (tempAttUse != null) {
                                        XSAttributeDecl tempAttDecl = tempAttUse.fAttrDecl;
                                        aValidator = (XSSimpleType)tempAttDecl.getTypeDefinition();
                                      }
                                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.