Parsing of closing XML nodes with namespaces.

This commit is contained in:
Yorick Peterse 2014-07-09 19:54:45 +02:00
parent 7bc442a965
commit f660b11e47
2 changed files with 10 additions and 1 deletions

View File

@ -225,7 +225,7 @@
'<' => start_element;
# Regular closing tags.
'</' identifier '>' => {
'</' identifier (':' identifier)* '>' => {
callback_simple("on_element_end");
};

View File

@ -141,5 +141,14 @@ describe Oga::XML::Lexer do
[:T_ELEM_END, nil, 1]
]
end
example 'lex an element with a start and end namespace' do
lex('<foo:p></foo:p>').should == [
[:T_ELEM_START, nil, 1],
[:T_ELEM_NS, 'foo', 1],
[:T_ELEM_NAME, 'p', 1],
[:T_ELEM_END, nil, 1]
]
end
end
end