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

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


        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

      {
        this.patternAnnotations = paramXSFacets.patternAnnotations;
        localObject = null;
        try
        {
          localObject = new RegularExpression(paramXSFacets.pattern, "X");
        }
        catch (Exception localException)
        {
          reportError("InvalidRegex", new Object[] { paramXSFacets.pattern, localException.getLocalizedMessage() });
        }
View Full Code Here

      str = paramObject.toString();
    int k;
    if ((this.fFacetsDefined & 0x8) != 0)
      for (k = this.fPattern.size() - 1; k >= 0; k--)
      {
        RegularExpression localRegularExpression = (RegularExpression)this.fPattern.elementAt(k);
        if (localRegularExpression.matches(str))
          continue;
        throw new InvalidDatatypeValueException("cvc-pattern-valid", new Object[] { paramObject, this.fPatternStr.elementAt(k), this.fTypeName });
      }
    Object localObject1;
    if (this.fVariety == 1)
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.