Parsing of closing XML nodes with namespaces.

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

No files matched your search

+1 -1
View File
@@ -225,7 +225,7 @@
'<' => start_element;
# Regular closing tags.
'</' identifier '>' => {
'</' identifier (':' identifier)* '>' => {
callback_simple("on_element_end");
};
+9
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