Overview | Package | Class | Tree | Deprecated | Index | Help
| oNVDL-20070517 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thaiopensource.datatype.xsd.regex.jdk1_4
Class Translator

    java.lang.Object
      com.thaiopensource.datatype.xsd.regex.jdk1_4.Translator

public class Translator
extends java.lang.Object

Translates XML Schema regexes into `java.util.regex` regexes.

See Also:
  `Pattern`, XML Schema Part 2

Method Summary
`static void` | `main(java.lang.String[] args)`
`static java.lang.String` | `translate(java.lang.String regexp)` 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

### translate

    public static java.lang.String translate(java.lang.String regexp)
                                      throws RegexSyntaxException

  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
  Returns:
    a String containing a regular expression in the syntax of java.util.regex.Pattern
  Throws:
    `RegexSyntaxException` - if `regexp` is not a regular expression in the syntax of XML Schemas Part 2
  See Also:
    `Pattern`, XML Schema Part 2

### main

    public static void main(java.lang.String[] args)
                     throws RegexSyntaxException

  Throws:
    `RegexSyntaxException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| oNVDL-20070517 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© Copyright SyncRO Soft SRL 2006-2007.