Package org.apache.xerces.impl.dv

Examples of org.apache.xerces.impl.dv.XSSimpleType.validate()


                XSSimpleType dv = (XSSimpleType)fCurrentType;
                try {
                    if (!fNormalizeData || fUnionType) {
                        fValidationState.setNormalizationRequired(true);
                    }
                    retValue = dv.validate(textContent, fValidationState, fValidatedInfo);
                }
                catch (InvalidDatatypeValueException e) {
                    reportSchemaError(e.getKey(), e.getArgs());
                    reportSchemaError("cvc-type.3.1.3", new Object[]{element.rawname, textContent});
                }
View Full Code Here


                XSSimpleType dv = ctype.fXSSimpleType;
                try {
                    if (!fNormalizeData || fUnionType) {
                        fValidationState.setNormalizationRequired(true);
                    }
                    actualValue = dv.validate(textContent, fValidationState, fValidatedInfo);
                }
                catch (InvalidDatatypeValueException e) {
                    reportSchemaError(e.getKey(), e.getArgs());
                    reportSchemaError("cvc-complex-type.2.2", new Object[]{element.rawname});
                }
View Full Code Here

        // get simple type
        XSSimpleType attDV = currDecl.fType;
       
        Object actualValue = null;
        try {
            actualValue = attDV.validate(attrValue, fValidationState, fValidatedInfo);
            // store the normalized value
            if (fNormalizeData)
                attributes.setValue(index, fValidatedInfo.normalizedValue);
            if (attributes instanceof XMLAttributesImpl) {
                XMLAttributesImpl attrs = (XMLAttributesImpl)attributes;
View Full Code Here

                if (oneAttr.dvIndex >= 0) {
                    if (oneAttr.dvIndex != DT_STRING &&
                        oneAttr.dvIndex != DT_XPATH &&
                        oneAttr.dvIndex != DT_XPATH1) {
                        XSSimpleType dv = fExtraDVs[oneAttr.dvIndex];
                        Object avalue = dv.validate(attrVal, schemaDoc.fValidationContext, null);
                        // kludge to handle chameleon includes/redefines...
                        if (oneAttr.dvIndex == DT_QNAME) {
                            QName qname = (QName)avalue;
                            if(qname.prefix == XMLSymbols.EMPTY_STRING && qname.uri == null && schemaDoc.fIsChameleonSchema)
                                qname.uri = schemaDoc.fTargetNamespace;
View Full Code Here

            // "string" type for validation
            dv = STRING_TYPE;
        }
        try {
            // validate the original lexical rep, and set the actual value
            actualValue = dv.validate(value, context, vinfo);
            // validate the canonical lexical rep
            if (vinfo != null)
                actualValue = dv.validate(vinfo.stringValue(), context, vinfo);
        } catch (InvalidDatatypeValueException ide) {
            return null;
View Full Code Here

        try {
            // validate the original lexical rep, and set the actual value
            actualValue = dv.validate(value, context, vinfo);
            // validate the canonical lexical rep
            if (vinfo != null)
                actualValue = dv.validate(vinfo.stringValue(), context, vinfo);
        } catch (InvalidDatatypeValueException ide) {
            return null;
        }

        return actualValue;
View Full Code Here

        // get the simple type declaration, and validate
        Object actualValue = null;
        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;
                }
View Full Code Here

            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

            // get attribute value
            String attrValue = attributes.getValue(index);

            Object actualValue = null;
            try {
                actualValue = attDV.validate(attrValue, fValidationState, fValidatedInfo);
                // PSVI: attribute normalized value
                attrPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
                // PSVI: attribute memberType
                attrPSVI.fMemberType = fValidatedInfo.memberType;
                // PSVI: element notation
View Full Code Here

                reportSchemaError("cvc-type.3.1.2", new Object[]{element.rawname});
            // 3.1.3 If clause 3.2 of Element Locally Valid (Element) (3.3.4) did not apply, then the normalized value must be valid with respect to the type definition as defined by String Valid (3.14.4).
            if (!fNil) {
                XSSimpleType dv = (XSSimpleType)fCurrentType;
                try {
                    retValue = dv.validate(textContent, fValidationState, fValidatedInfo);
                    // PSVI: schema normalized value
                    //
                    fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
                    // PSVI: memberType
                    fCurrentPSVI.fMemberType = fValidatedInfo.memberType;
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.