Package org.apache.xerces.impl.dv

Examples of org.apache.xerces.impl.dv.ValidatedInfo


                tnsAtt = schemaDoc.fTargetNamespace;
            }
        }
        // get 'value constraint'
        // for local named attribute, value constraint is absent
        ValidatedInfo attDefault = null;
        short constraintType = XSConstants.VC_NONE;
        if (isGlobal) {
            if (fixedAtt != null) {
                attDefault = new ValidatedInfo();
                attDefault.normalizedValue = fixedAtt;
                constraintType = XSConstants.VC_FIXED;
            } else if (defaultAtt != null) {
                attDefault = new ValidatedInfo();
                attDefault.normalizedValue = defaultAtt;
                constraintType = XSConstants.VC_DEFAULT;
            }
        }
View Full Code Here


                    if (thisConstType != XSConstants.VC_FIXED) {
                        errorCode="derivation-ok-restriction.2.1.3";
                        return errorCode;
                    } else {
                        // check the values are the same.
                        ValidatedInfo baseFixedValue=(baseAttrUse.fDefault!=null ?
                                                      baseAttrUse.fDefault: baseAttrDecl.fDefault);
                        ValidatedInfo thisFixedValue=(attrUse.fDefault!=null ?
                                                      attrUse.fDefault: attrDecl.fDefault);
                        if (!baseFixedValue.actualValue.equals(thisFixedValue.actualValue)) {
                            errorCode="derivation-ok-restriction.2.1.3";
                            return errorCode;
                        }
View Full Code Here

        if (abstractAtt != null && abstractAtt.booleanValue())
            element.setIsAbstract();

        // get 'value constraint'
        if (fixedAtt != null) {
            element.fDefault = new ValidatedInfo();
            element.fDefault.normalizedValue = fixedAtt;
            element.setConstraintType(XSConstants.VC_FIXED);
        } else if (defaultAtt != null) {
            element.fDefault = new ValidatedInfo();
            element.fDefault.normalizedValue = defaultAtt;
            element.setConstraintType(XSConstants.VC_DEFAULT);
        } else {
            element.setConstraintType(XSConstants.VC_NONE);
        }
View Full Code Here

                   return errorCode;
                 }
                 else {
                   // check the values are the same.  NB - this should not be a string
                   // comparison REVISIT when we have new datatype design!
                   ValidatedInfo baseFixedValue=(baseAttrUse.fDefault!=null ?
                                                baseAttrUse.fDefault: baseAttrDecl.fDefault);
                   ValidatedInfo thisFixedValue=(attrUse.fDefault!=null ?
                                                attrUse.fDefault: attrDecl.fDefault);
                   if (!baseFixedValue.normalizedValue.equals(thisFixedValue.normalizedValue)) {
                     errorCode="derivation-ok-restriction.2.1.3";
                     return errorCode;
                   }
View Full Code Here

        if (abstractAtt != null && abstractAtt.booleanValue())
            element.setIsAbstract();

        // get 'value constraint'
        if (fixedAtt != null) {
            element.fDefault = new ValidatedInfo();
            element.fDefault.normalizedValue = fixedAtt;
            element.setConstraintType(XSElementDecl.FIXED_VALUE);
        } else if (defaultAtt != null) {
            element.fDefault = new ValidatedInfo();
            element.fDefault.normalizedValue = defaultAtt;
            element.setConstraintType(XSElementDecl.DEFAULT_VALUE);
        } else {
            element.setConstraintType(XSElementDecl.NO_CONSTRAINT);
        }
View Full Code Here

            attrUse = new XSAttributeUse();
            attrUse.fAttrDecl = attribute;
            attrUse.fUse = useAtt.shortValue();
            attrUse.fConstraintType = consType;
            if (defaultAtt != null) {
                attrUse.fDefault = new ValidatedInfo();
                attrUse.fDefault.normalizedValue = defaultAtt;
            }
        }
        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
View Full Code Here

        // 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(XSElementDecl.FIXED_VALUE);
            } else if (defaultAtt != null) {
                attribute.fDefault = new ValidatedInfo();
                attribute.fDefault.normalizedValue = defaultAtt;
                attribute.setConstraintType(XSElementDecl.DEFAULT_VALUE);
            } else {
                attribute.setConstraintType(XSElementDecl.NO_CONSTRAINT);
            }
View Full Code Here

        if (dv != null) {
            try {
                if (value instanceof String) {
                    actualValue = dv.validate((String)value, context, vinfo);
                } else {
                    ValidatedInfo info = (ValidatedInfo)value;
                    dv.validate(context, info);
                    actualValue = info.actualValue;
                }
            } catch (InvalidDatatypeValueException ide) {
                return null;
View Full Code Here

        XSAttributeUse attrUses[] = attrGrp.getAttributeUses();
        int useCount = attrUses.length;
        XSAttributeUse currUse;
        XSAttributeDecl currDecl;
        short constType;
        ValidatedInfo defaultValue;
        boolean isSpecified;
        QName attName;
        // for each attribute use
        for (int i = 0; i < useCount; i++) {
View Full Code Here

    void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, short patternType, ValidationContext context)
        throws InvalidDatatypeFacetException {

        // if the object is immutable, should not apply facets...
        if(fIsImmutable) return;
        ValidatedInfo tempInfo = new ValidatedInfo();

        // clear facets. because we always inherit facets in the constructor
        // REVISIT: in fact, we don't need to clear them.
        // we can convert 5 string values (4 bounds + 1 enum) to actual values,
        // store them somewhere, then do facet checking at once, instead of
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.dv.ValidatedInfo

Copyright © 2018 www.massapicom. 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.