Examples of XSAttributeUse


Examples of com.sun.xml.xsom.XSAttributeUse

            col = new Column();
            type = ( (XSAttributeDecl) xs ).getType();
        }
        else if ( xs instanceof XSAttributeUse )
        {
            final XSAttributeUse au = (XSAttributeUse) xs;
            col = new Column();
            col.setNullable( !au.isRequired() );
            columnEmpty = false;
            type = ( (XSAttributeUse) xs ).getDecl().getType();
        }
        else if ( xs instanceof XSElementDecl )
        {
View Full Code Here

Examples of com.sun.xml.xsom.XSAttributeUse

                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
                    XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
                    XSAttributeDecl decl = attributeUse.getDecl();
                    xmlDefaultValue = decl.getDefaultValue();                       
                    xsType = decl.getType();
                }

                if (null == xmlDefaultValue || null == xmlDefaultValue.value) {
View Full Code Here

Examples of com.sun.xml.xsom.XSAttributeUse

                        xmlDefaultValue = element.getDefaultValue();                       
                        xsType = element.getType();
                        isElement = true;
                    }
                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse) {
                    XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
                    XSAttributeDecl decl = attributeUse.getDecl();
                    xmlDefaultValue = decl.getDefaultValue();                       
                    xsType = decl.getType();
                }

               
View Full Code Here

Examples of mf.org.apache.xerces.xs.XSAttributeUse

        XSObjectList attrUseS = fromAttrGrp.getAttributeUses();
        XSAttributeUseImpl oneAttrUse = null;
        int attrCount = attrUseS.getLength();
        for (int i=0; i<attrCount; i++) {
            oneAttrUse = (XSAttributeUseImpl)attrUseS.item(i);
            XSAttributeUse existingAttrUse = toAttrGrp.getAttributeUse(oneAttrUse.fAttrDecl.getNamespace(),
                    oneAttrUse.fAttrDecl.getName());
            if (existingAttrUse == null) {
               
                String idName = toAttrGrp.addAttributeUse(oneAttrUse);
                if (idName != null) {
View Full Code Here

Examples of mf.org.apache.xerces.xs.XSAttributeUse

            XSComplexTypeDecl enclosingCT) {
       
        Element child=null;
        XSAttributeGroupDecl tempAttrGrp = null;
        XSAttributeUseImpl tempAttrUse = null;
        XSAttributeUse otherUse = null;
        String childName;
       
        for (child=firstAttr; child!=null; child=DOMUtil.getNextSiblingElement(child)) {
            childName = DOMUtil.getLocalName(child);
            if (childName.equals(SchemaSymbols.ELT_ATTRIBUTE)) {
View Full Code Here

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

                                    // now, we have to go on the hunt for
                                    // datatype validator; not an easy or pleasant task...

                                    XSSimpleType aValidator = null;
                                    if (attrGrp != null) {
                                      XSAttributeUse tempAttUse = attrGrp.getAttributeUse(aname.uri, aname.localpart);
                                      if (tempAttUse != null) {
                                        XSAttributeDecl tempAttDecl = tempAttUse.fAttrDecl;
                                        aValidator = tempAttDecl.fType;
                                      }
                                    }
View Full Code Here

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

            consType = XSAttributeDecl.FIXED_VALUE;
            defaultAtt = fixedAtt;
            fixedAtt = null;
        }

        XSAttributeUse attrUse = null;
        if (attribute != null) {
            attrUse = new XSAttributeUse();
            attrUse.fAttrDecl = attribute;
            attrUse.fUse = useAtt.shortValue();
            attrUse.fConstraintType = consType;
            if (defaultAtt != null) {
                attrUse.fDefault = new ValidatedInfo();
View Full Code Here

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

                                 String typeName,
                                 boolean extension)
    throws ComplexTypeRecoverableError {

        XSAttributeUse[] attrUseS = fromAttrGrp.getAttributeUses();
        XSAttributeUse existingAttrUse, duplicateAttrUse =  null;
        for (int i=0; i<attrUseS.length; i++) {
            existingAttrUse = toAttrGrp.getAttributeUse(attrUseS[i].fAttrDecl.fTargetNamespace,
                                                        attrUseS[i].fAttrDecl.fName);
            if (existingAttrUse == null) {
                String idName = toAttrGrp.addAttributeUse(attrUseS[i]);
View Full Code Here

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

    Element traverseAttrsAndAttrGrps(Element firstAttr, XSAttributeGroupDecl attrGrp,
                                     XSDocumentInfo schemaDoc, SchemaGrammar grammar ) {

        Element child=null;
        XSAttributeGroupDecl tempAttrGrp = null;
        XSAttributeUse tempAttrUse = null;
        String childName;

        for (child=firstAttr; child!=null; child=DOMUtil.getNextSiblingElement(child)) {
            childName = DOMUtil.getLocalName(child);
            if (childName.equals(SchemaSymbols.ELT_ATTRIBUTE)) {
                tempAttrUse = fSchemaHandler.fAttributeTraverser.traverseLocal(child,
                                                                               schemaDoc, grammar);
                if (tempAttrUse == null) break;
                if (attrGrp.getAttributeUse(tempAttrUse.fAttrDecl.fTargetNamespace,
                                            tempAttrUse.fAttrDecl.fName)==null) {
                    String idName = attrGrp.addAttributeUse(tempAttrUse);
                    if (idName != null) {
                        reportGenericSchemaError("Two distinct members of the {attribute uses} '" +
                                                 idName + "' and '" + tempAttrUse.fAttrDecl.fName +
                                                 "' have {attribute declaration}s both of whose {type definition}s are or are derived from ID");
                    }
                }
                else {
                    // REVISIT: what if one of the attribute uses is "prohibited"
                    reportGenericSchemaError("Duplicate attribute " +
                                             tempAttrUse.fAttrDecl.fName + " found ");
                }
            }
            else if (childName.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
                //REVISIT: do we need to save some state at this point??
                tempAttrGrp = fSchemaHandler.fAttributeGroupTraverser.traverseLocal(
                       child, schemaDoc, grammar);
                if(tempAttrGrp == null ) break;
                XSAttributeUse[] attrUseS = tempAttrGrp.getAttributeUses();
                XSAttributeUse existingAttrUse = null;
                for (int i=0; i<attrUseS.length; i++) {
                    existingAttrUse = attrGrp.getAttributeUse(attrUseS[i].fAttrDecl.fTargetNamespace,
                                                              attrUseS[i].fAttrDecl.fName);
                    if (existingAttrUse == null) {
                        String idName = attrGrp.addAttributeUse(attrUseS[i]);
View Full Code Here

Examples of org.apache.xerces.impl.xs.psvi.XSAttributeUse

            sendElementEvent("psv:attributeUses");
        }
        else {
            sendIndentedElement("psv:attributeUses");
            for (int i = 0; i < uses.getLength(); i++) {
                XSAttributeUse use = (XSAttributeUse)uses.item(i);
                sendIndentedElement("psv:attributeUse");
                sendElementEvent(
                    "psv:required",
                    String.valueOf(use.getRequired()));
                processPSVIAttributeDeclarationOrRef(use.getAttrDeclaration());
                sendElementEvent(
                    "psv:valueConstraint",
                    use.getConstraintValue());
                sendUnIndentedElement("psv:attributeUse");
            }
            sendUnIndentedElement("psv:attributeUses");
        }
    }
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.