Examples of JRegularExpression


Examples of net.sf.saxon.regex.JRegularExpression

                final Platform platform = Configuration.getPlatform();
                final CharSequence regex = ((StringLiteral)this.regex).getStringValue();
                final CharSequence flagstr = ((StringLiteral)flags).getStringValue();
                final int xmlVersion = visitor.getConfiguration().getXMLVersion();
                int flagBits = JRegularExpression.setFlags(flagstr);
                pattern = new JRegularExpression(regex, xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);

                if (pattern.matches("")) {
                    // prevent it being reported more than once
                    pattern = new JRegularExpression("x", xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);
                    invalidRegex("The regular expression must not be one that matches a zero-length string", "XTDE1150");
                }
            } catch (XPathException err) {
                if ("XTDE1150".equals(err.getErrorCodeLocalPart())) {
                    throw err;
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

        if (re == null) {
            CharSequence flagstr = flags.evaluateAsString(context);
            final Platform platform = Configuration.getPlatform();
            final int xmlVersion = context.getConfiguration().getXMLVersion();
            int flagBits = JRegularExpression.setFlags(flagstr);
            re = new JRegularExpression(regex.evaluateAsString(context), xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);  
            if (re.matches("")) {
                dynamicError("The regular expression must not be one that matches a zero-length string",
                        "XTDE1150", context);
            }
        }
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

            }

            try {
                final int xmlVersion = c.getConfiguration().getXMLVersion();
                int flagBits = JRegularExpression.setFlags(flags);
                re = new JRegularExpression(arg1.getStringValueCS(), xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);

            } catch (XPathException err) {
                XPathException de = new XPathException(err);
                de.setErrorCode("FORX0002");
                de.setXPathContext(c);
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

                final Platform platform = Configuration.getPlatform();
                final CharSequence regex = ((StringLiteral)this.regex).getStringValue();
                final CharSequence flagstr = ((StringLiteral)flags).getStringValue();
                final int xmlVersion = getConfiguration().getXMLVersion();
                int flagBits = JRegularExpression.setFlags(flagstr);
                pattern = new JRegularExpression(regex, xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);

                if (pattern.matches("")) {
                    invalidRegex("The regular expression must not be one that matches a zero-length string", "XTDE1150");
                }
            } catch (XPathException err) {
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

        compileError(message, errorCode);
        // prevent it being reported more than once
        final Platform platform = Configuration.getPlatform();
        final int xmlVersion = getConfiguration().getXMLVersion();
        int flagBits = JRegularExpression.setFlags("");
        pattern = new JRegularExpression("x", xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);
    }
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

            }

            try {
                final int xmlVersion = c.getConfiguration().getXMLVersion();
                int flagBits = JRegularExpression.setFlags(flags);
                re = new JRegularExpression(pat.getStringValueCS(), xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);

            } catch (XPathException err) {
                XPathException de = new XPathException(err);
                de.maybeSetErrorCode("FORX0002");
                de.setXPathContext(c);
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

                if (flagstr.length() > 0 && flagstr.charAt(0) == '!') {
                    flagstr = flagstr.subSequence(1, flagstr.length());
                    syntax = RegularExpression.NATIVE_SYNTAX;
                }
                int flagBits = JRegularExpression.setFlags(flagstr);
                return new JRegularExpression(in, xmlVersion, syntax, flagBits);
            } catch (XPathException err) {
                err.maybeSetErrorCode("FORX0002");
                throw err;
            }
        } else {
View Full Code Here

Examples of net.sf.saxon.regex.JRegularExpression

            }

            try {
                final int xmlVersion = c.getConfiguration().getXMLVersion();
                int flagBits = JRegularExpression.setFlags(flags);
                re = new JRegularExpression(pattern, xmlVersion, RegularExpression.XPATH_SYNTAX, flagBits);  

            } catch (XPathException err) {
                XPathException de = new XPathException(err);
                de.setErrorCode("FORX0002");
                de.setXPathContext(c);
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.