Package org.apache.xerces.impl.xpath.regex

Examples of org.apache.xerces.impl.xpath.regex.RegularExpression


        // pattern
        if ((presentFacet & FACET_PATTERN) != 0) {
            if ((allowedFacet & FACET_PATTERN) == 0) {
                reportError("non-supported facet");
            } else {
                RegularExpression regex = null;
                try {
                    regex = new RegularExpression(facets.pattern, "X");
                } catch (Exception e) {
                    reportError("pattern value '"+facets.pattern+"' is not valid: " + e.getLocalizedMessage());
                }
                if (regex != null) {
                    fPattern = new Vector();
View Full Code Here


                    fEnumeration    = (Vector)facets.get(key);
                }
                else if ( key.equals(SchemaSymbols.ELT_PATTERN) ) {
                    fFacetsDefined |= DatatypeValidator.FACET_PATTERN;
                    fPattern = (String)facets.get(key);
                    fRegex   = new RegularExpression(fPattern, "X");


                }
                else {
                    String msg = "union datatype, facet "+key+" with value "+(String)facets.get(key);
View Full Code Here

                    String value = null;

                    if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                        fPattern = (String) facets.get(key);
                        if (fPattern != null)
                            fRegex = new RegularExpression(fPattern, "X" );
                        if (fRegex != null)
                            fFacetsDefined |= DatatypeValidator.FACET_PATTERN;
                    }
                    else if (key.equals(SchemaSymbols.ELT_ENUMERATION)) {
                        enumeration     = (Vector)facets.get(key);
View Full Code Here

                if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                    fFacetsDefined |= DatatypeValidator.FACET_PATTERN;
                    fPattern = (String)facets.get(key);
                    if (fPattern != null)
                        fRegex = new RegularExpression(fPattern, "X" );
                }
                else {
                    String msg = getErrorString(
                                               DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.ILLEGAL_BOOLEAN_FACET],
                                               new Object[] { key});
View Full Code Here

                    }
                    else if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                        fFacetsDefined |= DatatypeValidator.FACET_PATTERN;
                        fPattern = (String)facets.get(key);
                        if (fPattern != null)
                            fRegex = new RegularExpression(fPattern, "X");
                    }
                    else {
                        String msg = "list datatype, facet "+key+" with value "+(String)facets.get(key);
                        throw new InvalidDatatypeFacetException(msg);
                    }
View Full Code Here

                    }
                    else if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                        fFacetsDefined |= DatatypeValidator.FACET_PATTERN;
                        fPattern = (String)facets.get(key);
                        if (fPattern != null)
                            fRegex = new RegularExpression(fPattern, "X");
                    }
                    else if (key.equals(SchemaSymbols.ELT_ENUMERATION)) {
                        fEnumeration = (Vector)facets.get(key);
                        fFacetsDefined |= DatatypeValidator.FACET_ENUMERATION;
                    }
View Full Code Here

        if ((presentFacet & FACET_PATTERN) != 0) {
            if ((allowedFacet & FACET_PATTERN) == 0) {
                reportError("cos-applicable-facets", new Object[]{"pattern", fTypeName});
            } else {
                patternAnnotations = facets.patternAnnotations;
                RegularExpression regex = null;
                try {
                    regex = new RegularExpression(facets.pattern, "X");
                } catch (Exception e) {
                    reportError("InvalidRegex", new Object[]{facets.pattern, e.getLocalizedMessage()});
                }
                if (regex != null) {
                    fPattern = new Vector();
View Full Code Here

            nvalue = normalize(content, fWhiteSpace);
        } else {
            nvalue = content.toString();
        }
        if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
            RegularExpression regex;
            for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                regex = (RegularExpression)fPattern.elementAt(idx);
                if (!regex.matches(nvalue)){
                    throw new InvalidDatatypeValueException("cvc-pattern-valid",
                                                            new Object[]{content,
                                                            fPatternStr.elementAt(idx),

                                                            fTypeName});
View Full Code Here

        if ((presentFacet & FACET_PATTERN) != 0) {
            if ((allowedFacet & FACET_PATTERN) == 0) {
                reportError("cos-applicable-facets", new Object[]{"pattern", fTypeName});
            } else {
                patternAnnotations = facets.patternAnnotations;
                RegularExpression regex = null;
                try {
                    regex = new RegularExpression(facets.pattern, "X", context.getLocale());
                } catch (Exception e) {
                    reportError("InvalidRegex", new Object[]{facets.pattern, e.getLocalizedMessage()});
                }
                if (regex != null) {
                    fPattern = new Vector();
View Full Code Here

            nvalue = normalize(content, fWhiteSpace);
        } else {
            nvalue = content.toString();
        }
        if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
            RegularExpression regex;
            for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                regex = (RegularExpression)fPattern.elementAt(idx);
                if (!regex.matches(nvalue)){
                    throw new InvalidDatatypeValueException("cvc-pattern-valid",
                            new Object[]{content,
                            fPatternStr.elementAt(idx),

                            fTypeName});
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.xpath.regex.RegularExpression

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.