Package org.apache.xerces.impl.dv

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


            else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
                if (fChildCount != 0)
                    reportSchemaError("cvc-complex-type.2.2", new Object[]{element.rawname});
                XSSimpleType dv = ctype.fXSSimpleType;
                try {
                    actualValue = dv.validate(textContent, fValidationState, fValidatedInfo);

                    // PSVI: schema normalized value
                    //
                    fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
                    // PSVI: memberType
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 == fSchemaHandler.EMPTY_STRING && qname.uri == null && schemaDoc.fIsChameleonSchema)
                                qname.uri = schemaDoc.fTargetNamespace;
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

                elName = (String)values.elementAt(i);
                try {
                    // and validate it using the XSSimpleType
                    // REVISIT: what would be the proper validation context?
                    //          guess we need to save that in the vectors too.
                    dv.validate((String)values.elementAt(i+1), null, null);
                } catch(InvalidDatatypeValueException ide) {
                    reportSchemaError ("s4s-att-invalid-value",
                                       new Object[] {elName, attrName, ide.getMessage()},
                                       null);
                }
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

        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 });
        }
        // REVISIT: eventually, this method should return the same actualValue as elementLocallyValidType...
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

                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

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.