our
$nbsp
=
"\xa0"
;
our
$tags
= [
'a'
,
'abbr'
,
'acronym'
,
'address'
,
'applet'
,
'area'
,
'b'
,
'base'
,
'basefont'
,
'bdo'
,
'big'
,
'blockquote'
,
'body'
,
'br'
,
'button'
,
'caption'
,
'center'
,
'cite'
,
'code'
,
'col'
,
'colgroup'
,
'dd'
,
'del'
,
'dfn'
,
'dir'
,
'div'
,
'dl'
,
'dt'
,
'em'
,
'fieldset'
,
'font'
,
'form'
,
'h1'
,
'h2'
,
'h3'
,
'h4'
,
'h5'
,
'h6'
,
'head'
,
'hr'
,
'html'
,
'i'
,
'iframe'
,
'img'
,
'input'
,
'ins'
,
'isindex'
,
'kbd'
,
'label'
,
'legend'
,
'li'
,
'link'
,
'map'
,
'menu'
,
'meta'
,
'noframes'
,
'noscript'
,
'object'
,
'ol'
,
'optgroup'
,
'option'
,
'p'
,
'param'
,
'pre'
,
'q'
,
's'
,
'samp'
,
'script'
,
'select'
,
'small'
,
'source'
,
'span'
,
'strike'
,
'strong'
,
'style'
,
'sub'
,
'sup'
,
'table'
,
'tbody'
,
'td'
,
'textarea'
,
'tfoot'
,
'th'
,
'thead'
,
'title'
,
'tr'
,
'tt'
,
'u'
,
'ul'
,
'var'
,
'video'
,
];
our
$funcs
= [
map
{
my
$tag
=
$_
;
[
uc
$tag
,
sub
{
my
$atts
=
ref
(
$_
[0]) eq
"HASH"
?
shift
:
undef
;
PXML::_::XHTML->new(
$tag
,
$atts
, [
@_
]);
}
]
}
@$tags
];
for
(
@$funcs
) {
my
(
$name
,
$fn
) =
@$_
;
no
strict
'refs'
;
*{
"PXML::XHTML::$name"
} =
$fn
}
our
@EXPORT_OK
= (
'$nbsp'
,
map
{
$$_
[0] }
@$funcs
);
our
%EXPORT_TAGS
= (
all
=> \
@EXPORT_OK
);
our
@ISA
=
"PXML::Element"
;
sub
require_printing_nonvoid_elements_nonselfreferential {
1
}
sub
void_element_h {
$html5_void_element_h
}
sub
FP_Show_show {
my
(
$s
,
$show
) =
@_
;
my
$a
=
$s
->maybe_attributes;
my
$b
=
$s
->body;
(
uc
(
$s
->name) .
"("
.
join
(
", "
,
(
defined
(
$a
) and
keys
%$a
) ?
&$show
(
$a
) : (),
ref
(
$b
) eq
"ARRAY"
?
join
(
", "
,
map
{
&$show
(
$_
) }
@$b
)
:
&$show
(
$b
))
.
")"
)
}
}
1