Package org.apache.xerces.impl.xs.util

Examples of org.apache.xerces.impl.xs.util.XInt.intValue()


            reportSchemaError("src-attribute.1", new Object[]{nameAtt});
        }

        // 2 If default and use are both present, use must have the �actual value� optional.
        if (consType == XSAttributeDecl.DEFAULT_VALUE &&
            useAtt != null && useAtt.intValue() != SchemaSymbols.USE_OPTIONAL) {
            reportSchemaError("src-attribute.2", new Object[]{nameAtt});
        }

        // a-props-correct
View Full Code Here


        // get 'target namespace'
        if (isGlobal) {
            attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
        }
        else 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;
View Full Code Here

     * @param grammar
     * @return
     */
    private XSSimpleType getSimpleType(String name, Element simpleTypeDecl, Object[] attrValues, XSDocumentInfo schemaDoc, SchemaGrammar grammar) {
        XInt finalAttr = (XInt)attrValues[XSAttributeChecker.ATTIDX_FINAL];
        int finalProperty = finalAttr == null ? schemaDoc.fFinalDefault : finalAttr.intValue();
        // annotation?,(list|restriction|union)
        Element child = DOMUtil.getFirstChildElement(simpleTypeDecl);
        XSAnnotationImpl [] annotations = null;
        if (child != null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
            XSAnnotationImpl annotation = traverseAnnotationDecl(child, attrValues, false, schemaDoc);
View Full Code Here

                    else if (childName.equals(SchemaSymbols.ELT_GROUP)) {
                        // check for the constraints on minOccurs and maxOccurs attributes of xs:group particle
                        Object[] groupAttrValues = fAttrChecker.checkAttributes(child, false, schemaDoc);
                        XInt  groupMinAttr = (XIntgroupAttrValues[XSAttributeChecker.ATTIDX_MINOCCURS];
                        XInt  groupMaxAttr = (XIntgroupAttrValues[XSAttributeChecker.ATTIDX_MAXOCCURS];                       
                        if (!(groupMinAttr.intValue() == 1 && groupMaxAttr.intValue() == 1)) {
                            reportSchemaError("cos-all-limited.1.3", null, child)
                        }
                       
                        particle = fSchemaHandler.fGroupTraverser.traverseLocal(child, schemaDoc, grammar);                                               
                        if (particle != null) {
View Full Code Here

        }
        group.fAnnotations = annotations;
        particle = new XSParticleDecl();
        particle.fType = XSParticleDecl.PARTICLE_MODELGROUP;
        particle.fMinOccurs = minAtt.intValue();
        particle.fMaxOccurs = maxAtt.intValue();
        particle.fValue = group;
        particle.fAnnotations = annotations;
       
        particle = checkOccurrences(particle,
                SchemaSymbols.ELT_ALL,
View Full Code Here

        }
        group.fAnnotations = annotations;
        particle = new XSParticleDecl();
        particle.fType = XSParticleDecl.PARTICLE_MODELGROUP;
        particle.fMinOccurs = minAtt.intValue();
        particle.fMaxOccurs = maxAtt.intValue();
        particle.fValue = group;
        particle.fAnnotations = annotations;
       
        particle = checkOccurrences(particle,
                choice ? SchemaSymbols.ELT_CHOICE : SchemaSymbols.ELT_SEQUENCE,
View Full Code Here

            reportSchemaError("src-attribute.1", new Object[]{nameAtt}, attrDecl);
        }
       
        // 2 If default and use are both present, use must have the actual value optional.
        if (consType == XSConstants.VC_DEFAULT &&
                useAtt != null && useAtt.intValue() != SchemaSymbols.USE_OPTIONAL) {
            reportSchemaError("src-attribute.2", new Object[]{nameAtt}, attrDecl);
            // Recover by honouring the default value
            attrUse.fUse = SchemaSymbols.USE_OPTIONAL;
        }
       
View Full Code Here

            }
            if (targetNsAtt != null) {
                // XML Schema 1.1, set the target namespace to be the value of the targetNamespace attribute if one is defined
                tnsAtt = fSymbolTable.addSymbol(targetNsAtt);
            } else if (formAtt != null) {
                if (formAtt.intValue() == SchemaSymbols.FORM_QUALIFIED)
                    tnsAtt = schemaDoc.fTargetNamespace;
            } else if (schemaDoc.fAreLocalAttributesQualified) {
                tnsAtt = schemaDoc.fTargetNamespace;
            }
        }
View Full Code Here

        } else {
            element = traverseNamedElement(elmDecl, attrValues, schemaDoc, grammar, false, parent);
        }
       
        particle.fMinOccurs = minAtt.intValue();
        particle.fMaxOccurs = maxAtt.intValue();
        if (element != null) {
            particle.fType = XSParticleDecl.PARTICLE_ELEMENT;
            particle.fValue = element;
        }
        else {
View Full Code Here

            if (targetNsAtt!=null) {
                // XML Schema 1.1, set the target namespace to be the value of the targetNamespace attribute if one is defined
                targetNsAtt = fSymbolTable.addSymbol(targetNsAtt);
                element.fTargetNamespace = targetNsAtt;
            } else if (formAtt != null) {
                if (formAtt.intValue() == SchemaSymbols.FORM_QUALIFIED)
                    element.fTargetNamespace = schemaDoc.fTargetNamespace;
                else
                    element.fTargetNamespace = null;
            } else if (schemaDoc.fAreLocalElementsQualified) {
                element.fTargetNamespace = schemaDoc.fTargetNamespace;
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.