| |
|
| java.lang.Object net.sf.saxon.type.RegexTranslator
RegexTranslator | public class RegexTranslator (Code) | | This class translates XML Schema regex syntax into JDK 1.4 regex syntax.
Author: James Clark
Modified by Michael Kay (a) to integrate the code into Saxon, and (b) to support XPath additions
to the XML Schema regex syntax.
|
Inner Class :final static class Range implements Comparable | |
Inner Class :abstract static class CharClass | |
Inner Class :abstract static class SimpleCharClass extends CharClass | |
Inner Class :static class SingleChar extends SimpleCharClass | |
Inner Class :static class WideSingleChar extends SimpleCharClass | |
Inner Class :static class Empty extends SimpleCharClass | |
Inner Class :static class CharRange extends SimpleCharClass | |
Inner Class :static class Property extends SimpleCharClass | |
Inner Class :static class Subtraction extends CharClass | |
Inner Class :static class Union extends CharClass | |
Inner Class :static class BackReference extends CharClass | |
Inner Class :public static class RegexSyntaxException extends Exception | |
Inner Class :static class Complement extends CharClass | |
Method Summary | |
public static void | main(String[] args) | public static String | translate(CharSequence regexp, boolean xpath) Translates a regular expression in the syntax of XML Schemas Part 2 into a regular
expression in the syntax of java.util.regex.Pattern . |
CATEGORY_RANGES | final static int[][] CATEGORY_RANGES(Code) | | |
NMCHAR_CATEGORIES | final static String NMCHAR_CATEGORIES(Code) | | |
NMCHAR_EXCLUDE_RANGES | final static String NMCHAR_EXCLUDE_RANGES(Code) | | |
NMSTRT_CATEGORIES | final static String NMSTRT_CATEGORIES(Code) | | |
NMSTRT_EXCLUDE_RANGES | final static String NMSTRT_EXCLUDE_RANGES(Code) | | |
NONE | final static int NONE(Code) | | |
NOT_ALLOWED_CLASS | final static String NOT_ALLOWED_CLASS(Code) | | |
SOME | final static int SOME(Code) | | |
SURROGATES1_CLASS | final static String SURROGATES1_CLASS(Code) | | |
SURROGATES2_CLASS | final static String SURROGATES2_CLASS(Code) | | |
main | public static void main(String[] args) throws RegexSyntaxException(Code) | | |
translate | public static String translate(CharSequence regexp, boolean xpath) throws RegexSyntaxException(Code) | | Translates a regular expression in the syntax of XML Schemas Part 2 into a regular
expression in the syntax of java.util.regex.Pattern . The translation
assumes that the string to be matched against the regex uses surrogate pairs correctly.
If the string comes from XML content, a conforming XML parser will automatically
check this; if the string comes from elsewhere, it may be necessary to check
surrogate usage before matching.
Parameters: regexp - a String containing a regular expression in the syntax of XML Schemas Part 2 Parameters: xpath - a boolean indicating whether the XPath 2.0 F+O extensions to the schemaregex syntax are permitted a String containing a regular expression in the syntax of java.util.regex.Pattern throws: RegexSyntaxException - if regexp is not a regular expression in thesyntax of XML Schemas Part 2 See Also: java.util.regex.Pattern See Also: XML Schema Part 2 |
|
|
|