|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.sf.saxon.type.RegexTranslator
This class translates XML Schema regex syntax into JDK 1.4 regex syntax. Author: James Clark
| Nested Class Summary | |
static class |
RegexTranslator.RegexSyntaxException
Thrown when an syntactically incorrect regular expression is detected. |
| Method Summary | |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
translate(java.lang.String 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.lang.String translate(java.lang.String regexp,
boolean xpath)
throws RegexTranslator.RegexSyntaxException
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.
regexp - a String containing a regular expression in the syntax of XML Schemas Part 2xpath - a boolean indicating whether the XPath 2.0 F+O extensions to the schema
regex syntax are permitted
RegexTranslator.RegexSyntaxException - if regexp is not a regular expression in the
syntax of XML Schemas Part 2Pattern,
XML Schema Part 2
public static void main(java.lang.String[] args)
throws RegexTranslator.RegexSyntaxException
RegexTranslator.RegexSyntaxException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||