Examples of XSAttributeDecl


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

                                             XSDocumentInfo schemaDoc,
                                             SchemaGrammar grammar) {

        // General Attribute Checking
        Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, schemaDoc);
        XSAttributeDecl attribute = traverseNamedAttr(attrDecl, attrValues, schemaDoc, grammar, true, null);
        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
        return attribute;

    }
View Full Code Here

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

        XInt    formAtt    = (XInt)   attrValues[XSAttributeChecker.ATTIDX_FORM];
        String  nameAtt    = (String) attrValues[XSAttributeChecker.ATTIDX_NAME];
        QName   typeAtt    = (QNameattrValues[XSAttributeChecker.ATTIDX_TYPE];

        // Step 1: get declaration information
        XSAttributeDecl attribute = null;
        if (fSchemaHandler.fDeclPool !=null) {
            attribute = fSchemaHandler.fDeclPool.getAttributeDecl();
        } else {
            attribute = new XSAttributeDecl();
        }

        // get 'name'
        if (nameAtt != null)
            attribute.fName = fSymbolTable.addSymbol(nameAtt);

        // get 'target namespace'
        if (isGlobal) {
            attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
            attribute.setIsGlobal();
        }
        else {
            if (enclosingCT != null)
                attribute.setIsLocal(enclosingCT);
            if (formAtt != null) {
                if (formAtt.intValue() == SchemaSymbols.FORM_QUALIFIED)
                    attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
                else
                    attribute.fTargetNamespace = null;
            } else if (schemaDoc.fAreLocalAttributesQualified) {
                attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
            } else {
                attribute.fTargetNamespace = null;
            }
        }

        // get 'value constraint'
        // for local named attribute, value constraint is absent
        if (isGlobal) {
            if (fixedAtt != null) {
                attribute.fDefault = new ValidatedInfo();
                attribute.fDefault.normalizedValue = fixedAtt;
                attribute.setConstraintType(XSConstants.VC_FIXED);
            } else if (defaultAtt != null) {
                attribute.fDefault = new ValidatedInfo();
                attribute.fDefault.normalizedValue = defaultAtt;
                attribute.setConstraintType(XSConstants.VC_DEFAULT);
            } else {
                attribute.setConstraintType(XSConstants.VC_NONE);
            }
        }

        // get 'annotation'
        Element child = DOMUtil.getFirstChildElement(attrDecl);
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.