oops - ncnames don't contain colons

This commit is contained in:
jez 2007-12-23 22:52:39 +00:00
parent 27d23630ce
commit 934a03e703
2 changed files with 8 additions and 3 deletions

View file

@ -26,7 +26,6 @@ namespace XML
(c == Unicode<wchar_t>::FULL_STOP) ||
(c == Unicode<wchar_t>::HYPHEN_MINUS) ||
(c == Unicode<wchar_t>::LOW_LINE) ||
(c == Unicode<wchar_t>::COLON) ||
is_combining_char(c) ||
is_extender(c)))
return false;

View file

@ -30,14 +30,19 @@ public:
void test4()
{
assertTrue(is_ncname("a:b"));
assertTrue(is_ncname("a_b"));
} // test4
void test5()
{
assertFalse(is_ncname(":b"));
assertFalse(is_ncname("a:b"));
} // test5
void test6()
{
assertFalse(is_ncname("xsl:foo"));
} // test6
}; // class XMLStringTest
TestSuite* XMLStringTest_suite()
@ -49,6 +54,7 @@ TestSuite* XMLStringTest_suite()
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test3", &XMLStringTest::test3));
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test4", &XMLStringTest::test4));
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test5", &XMLStringTest::test5));
suiteOfTests->addTest(new TestCaller<XMLStringTest>("test6", &XMLStringTest::test6));
return suiteOfTests;
} // XMLStringTest_suite