code: public static Pattern name(String namespaceUri, String localName)
     {
        if (namespaceUri == null || localName == null)
        {
           throw new IllegalArgumentException("neither namespaceUri nor localName can be null");
        }
        return new RegexPattern(namespaceUri, localName);
     }
docs: Constructs a pattern which matches a path elements against regular expressions.
  @param namespaceUri A regular expression used for matching the name space URI of
  a path element.
  @param localName A regular expression used for matching the local name of a path
  element
  @return  A pattern which matches a path element if namespaceUri matches the
  name space URI of the path element and localName matches the local name of the
  path element.
  @throws IllegalArgumentException if either <code>namespaceUri</code> or
  <code>localName</code> is <code>null</code>
  
  @see java.util.regex.Pattern