0
0
mirror of https://github.com/zeux/pugixml.git synced 2025-01-14 18:07:59 +08:00

XPath: Minor fix

git-svn-id: http://pugixml.googlecode.com/svn/trunk@218 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2009-11-08 12:34:00 +00:00
parent e3293a8baa
commit b1f1de5a7a
2 changed files with 4 additions and 2 deletions

View File

@ -3401,8 +3401,7 @@ namespace pugi
// This is either a function call, or not - if not, we shall proceed with location path
const char* state = m_lexer.state();
// $$$ signed char
while (*state && *state <= 32) ++state;
while (is_chartype(*state, ct_space)) ++state;
if (*state != '(') return parse_location_path();

View File

@ -682,6 +682,9 @@ TEST(xpath_function_arguments)
// lack of commas
CHECK_XPATH_FAIL("substring(1 2)");
// whitespace after function name
CHECK_XPATH_BOOLEAN(c, "true ()", true);
}
TEST_XML_FLAGS(xpath_string_value, "<node><c1>pcdata</c1><c2><child/></c2><c3 attr='avalue'/><c4><?target pivalue?></c4><c5><!--comment--></c5><c6><![CDATA[cdata]]></c6></node>", parse_default | parse_pi | parse_comments)