1071 |
## -- Choose the most apppropriate class for the element |
## -- Choose the most apppropriate class for the element |
1072 |
my $class = 'Message::DOM::Element'; |
my $class = 'Message::DOM::Element'; |
1073 |
if (defined $nsuri) { |
if (defined $nsuri) { |
1074 |
if ($nsuri eq q<http://www.w3.org/2005/Atom>) { |
if ($nsuri eq q<http://www.w3.org/1999/xhtml>) { |
1075 |
|
require Message::DOM::HTML::HTMLElement; |
1076 |
|
$class = { |
1077 |
|
a => 'Message::DOM::HTML::HTMLAnchorElement', |
1078 |
|
area => 'Message::DOM::HTML::HTMLAreaElement', |
1079 |
|
audio => 'Message::DOM::HTML::HTMLAudioElement', |
1080 |
|
base => 'Message::DOM::HTML::HTMLBaseElement', |
1081 |
|
body => 'Message::DOM::HTML::HTMLBodyElement', |
1082 |
|
canvas => 'Message::DOM::HTML::HTMLCanvasElement', |
1083 |
|
command => 'Message::DOM::HTML::HTMLCommandElement', |
1084 |
|
datagrid => 'Message::DOM::HTML::HTMLDataGridElement', |
1085 |
|
details => 'Message::DOM::HTML::HTMLDetailsElement', |
1086 |
|
embed => 'Message::DOM::HTML::HTMLEmbedElement', |
1087 |
|
'event-source' => 'Message::DOM::HTML::HTMLEventSourceElement', |
1088 |
|
font => 'Message::DOM::HTML::HTMLFontElement', |
1089 |
|
head => 'Message::DOM::HTML::HTMLHeadElement', |
1090 |
|
html => 'Message::DOM::HTML::HTMLHtmlElement', |
1091 |
|
iframe => 'Message::DOM::HTML::HTMLIFrameElement', |
1092 |
|
img => 'Message::DOM::HTML::HTMLImageElement', |
1093 |
|
li => 'Message::DOM::HTML::HTMLLIElement', |
1094 |
|
link => 'Message::DOM::HTML::HTMLLinkElement', |
1095 |
|
map => 'Message::DOM::HTML::HTMLMapElement', |
1096 |
|
menu => 'Message::DOM::HTML::HTMLMenuElement', |
1097 |
|
meta => 'Message::DOM::HTML::HTMLMetaElement', |
1098 |
|
meter => 'Message::DOM::HTML::HTMLMeterElement', |
1099 |
|
del => 'Message::DOM::HTML::HTMLModElement', |
1100 |
|
ins => 'Message::DOM::HTML::HTMLModElement', |
1101 |
|
object => 'Message::DOM::HTML::HTMLObjectElement', |
1102 |
|
ol => 'Message::DOM::HTML::HTMLOListElement', |
1103 |
|
param => 'Message::DOM::HTML::HTMLParamElement', |
1104 |
|
progress => 'Message::DOM::HTML::HTMLProgressElement', |
1105 |
|
blockquote => 'Message::DOM::HTML::HTMLQuoteElement', |
1106 |
|
q => 'Message::DOM::HTML::HTMLQuoteElement', |
1107 |
|
script => 'Message::DOM::HTML::HTMLScriptElement', |
1108 |
|
source => 'Message::DOM::HTML::HTMLSourceElement', |
1109 |
|
style => 'Message::DOM::HTML::HTMLStyleElement', |
1110 |
|
table => 'Message::DOM::HTML::HTMLTableElement', |
1111 |
|
td => 'Message::DOM::HTML::HTMLTableCellElement', |
1112 |
|
col => 'Message::DOM::HTML::HTMLTableColElement', |
1113 |
|
colgroup => 'Message::DOM::HTML::HTMLTableColElement', |
1114 |
|
th => 'Message::DOM::HTML::HTMLTableHeaderCellElement', |
1115 |
|
tr => 'Message::DOM::HTML::HTMLTableRowElement', |
1116 |
|
tbody => 'Message::DOM::HTML::HTMLTableSectionElement', |
1117 |
|
tfoot => 'Message::DOM::HTML::HTMLTableSectionElement', |
1118 |
|
thead => 'Message::DOM::HTML::HTMLTableSectionElement', |
1119 |
|
time => 'Message::DOM::HTML::HTMLTimeElement', |
1120 |
|
video => 'Message::DOM::HTML::HTMLVideoElement', |
1121 |
|
}->{$lname} || 'Message::DOM::HTML::HTMLElement'; |
1122 |
|
} elsif ($nsuri eq q<http://www.w3.org/2005/Atom>) { |
1123 |
require Message::DOM::Atom::AtomElement; |
require Message::DOM::Atom::AtomElement; |
1124 |
$class = { |
$class = { |
1125 |
author => 'Message::DOM::Atom::AtomElement::AtomPersonConstruct', |
author => 'Message::DOM::Atom::AtomElement::AtomPersonConstruct', |