From 934a03e7036f78fa54daf279b50994f8cce29b39 Mon Sep 17 00:00:00 2001 From: jez <> Date: Sun, 23 Dec 2007 22:52:39 +0000 Subject: [PATCH] oops - ncnames don't contain colons --- include/XML/strings.hpp | 1 - tests/Utils/test_xml_strings.hpp | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/XML/strings.hpp b/include/XML/strings.hpp index c952cec1..d964d0a4 100755 --- a/include/XML/strings.hpp +++ b/include/XML/strings.hpp @@ -26,7 +26,6 @@ namespace XML (c == Unicode::FULL_STOP) || (c == Unicode::HYPHEN_MINUS) || (c == Unicode::LOW_LINE) || - (c == Unicode::COLON) || is_combining_char(c) || is_extender(c))) return false; diff --git a/tests/Utils/test_xml_strings.hpp b/tests/Utils/test_xml_strings.hpp index c205c140..c5de8ac0 100755 --- a/tests/Utils/test_xml_strings.hpp +++ b/tests/Utils/test_xml_strings.hpp @@ -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("test3", &XMLStringTest::test3)); suiteOfTests->addTest(new TestCaller("test4", &XMLStringTest::test4)); suiteOfTests->addTest(new TestCaller("test5", &XMLStringTest::test5)); + suiteOfTests->addTest(new TestCaller("test6", &XMLStringTest::test6)); return suiteOfTests; } // XMLStringTest_suite