String[] validPrefixes = {"", "a", "a_", "a-", "foo-bar", "rdf", "ns108"};
String[] inValidPrefixes = {"_a", "-a", "a b", "5", "107a", "a.b"};
String[] validLocalNames = {"", "a", "foo", "foo1331", "_a", "__a"};
String[] inValidLocalNames = {".a", "a.b", "23", "2a"};
Lexicon l = new Lexicon(getTestModel());
for (String prefix : validPrefixes) {
assertTrue("\"" + prefix + "\" should be accepted as a valid prefix", l.isValidPrefix(prefix));
}
for (String prefix : inValidPrefixes) {
assertFalse("\"" + prefix + "\" should not be accepted as a valid prefix", l.isValidPrefix(prefix));
}
}