5291 |
|
|
5292 |
my $nt = $child->node_type; |
my $nt = $child->node_type; |
5293 |
if ($nt == 1) { # Element |
if ($nt == 1) { # Element |
5294 |
my $tag_name = lc $child->tag_name; ## ISSUE: Definition of "lowercase" |
my $tag_name = $child->tag_name; ## TODO: manakai_tag_name |
5295 |
$s .= '<' . $tag_name; |
$s .= '<' . $tag_name; |
5296 |
|
## NOTE: Non-HTML case: |
5297 |
## ISSUE: Non-html elements |
## <http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/11191> |
5298 |
|
|
5299 |
my @attrs = @{$child->attributes}; # sort order MUST be stable |
my @attrs = @{$child->attributes}; # sort order MUST be stable |
5300 |
for my $attr (@attrs) { # order is implementation dependent |
for my $attr (@attrs) { # order is implementation dependent |
5301 |
my $attr_name = lc $attr->name; ## ISSUE: Definition of "lowercase" |
my $attr_name = $attr->name; ## TODO: manakai_name |
5302 |
$s .= ' ' . $attr_name . '="'; |
$s .= ' ' . $attr_name . '="'; |
5303 |
my $attr_value = $attr->value; |
my $attr_value = $attr->value; |
5304 |
## escape |
## escape |