23 |
} |
} |
24 |
}, |
}, |
25 |
lang => sub { |
lang => sub { |
26 |
|
my ($self, $attr) = @_; |
27 |
## NOTE: "The values of the attribute are language identifiers |
## NOTE: "The values of the attribute are language identifiers |
28 |
## as defined by [IETF RFC 3066], Tags for the Identification |
## as defined by [IETF RFC 3066], Tags for the Identification |
29 |
## of Languages, or its successor; in addition, the empty string |
## of Languages, or its successor; in addition, the empty string |
30 |
## may be specified." ("may" in lower case) |
## may be specified." ("may" in lower case) |
31 |
## TODO: xml:lang MUST NOT in HTML document |
if ($attr->owner_document->manakai_is_html) { # MUST NOT |
32 |
|
$self->{onerror}->(node => $attr, level => 'error', |
33 |
|
type => 'in HTML:xml:lang'); |
34 |
|
## TODO: Test data... |
35 |
|
} |
36 |
}, |
}, |
37 |
base => sub { |
base => sub { |
38 |
my ($self, $attr) = @_; |
my ($self, $attr) = @_; |
956 |
}, |
}, |
957 |
title => sub {}, ## NOTE: No conformance creteria |
title => sub {}, ## NOTE: No conformance creteria |
958 |
lang => sub { |
lang => sub { |
959 |
|
my ($self, $attr) = @_; |
960 |
## TODO: RFC 3066 or empty test |
## TODO: RFC 3066 or empty test |
961 |
## ISSUE: RFC 4646 (3066bis)? |
## ISSUE: RFC 4646 (3066bis)? |
962 |
## TODO: HTML vs XHTML |
unless ($attr->owner_document->manakai_is_html) { |
963 |
|
$self->{onerror}->(node => $attr, type => 'in XML:lang'); |
964 |
|
} |
965 |
}, |
}, |
966 |
dir => $GetHTMLEnumeratedAttrChecker->({ltr => 1, rtl => 1}), |
dir => $GetHTMLEnumeratedAttrChecker->({ltr => 1, rtl => 1}), |
967 |
class => $HTMLUnorderedSetOfSpaceSeparatedTokensAttrChecker, |
class => $HTMLUnorderedSetOfSpaceSeparatedTokensAttrChecker, |
1028 |
my $value = $attr->value; |
my $value = $attr->value; |
1029 |
unless ($value eq $HTML_NS) { |
unless ($value eq $HTML_NS) { |
1030 |
$self->{onerror}->(node => $attr, type => 'invalid attribute value'); |
$self->{onerror}->(node => $attr, type => 'invalid attribute value'); |
1031 |
## TODO: only in HTML documents |
} |
1032 |
|
unless ($attr->owner_document->manakai_is_html) { |
1033 |
|
$self->{onerror}->(node => $attr, type => 'in XML:xmlns'); |
1034 |
|
## TODO: Test |
1035 |
} |
} |
1036 |
}, |
}, |
1037 |
}), |
}), |
1283 |
$self->{onerror}->(node => $content_attr, |
$self->{onerror}->(node => $content_attr, |
1284 |
type => 'attribute not allowed'); |
type => 'attribute not allowed'); |
1285 |
} |
} |
|
## TODO: Allowed only in HTML documents |
|
1286 |
} else { |
} else { |
1287 |
if (defined $content_attr) { |
if (defined $content_attr) { |
1288 |
$self->{onerror}->(node => $content_attr, |
$self->{onerror}->(node => $content_attr, |
1311 |
} |
} |
1312 |
} |
} |
1313 |
|
|
1314 |
## TODO: charset |
if (defined $charset_attr) { |
1315 |
|
unless ($todo->{node}->owner_document->manakai_is_html) { |
1316 |
|
$self->{onerror}->(node => $charset_attr, |
1317 |
|
type => 'in XML:charset'); |
1318 |
|
} |
1319 |
|
## TODO: charset |
1320 |
|
} |
1321 |
}, |
}, |
1322 |
checker => $HTMLEmptyChecker, |
checker => $HTMLEmptyChecker, |
1323 |
}; |
}; |
2691 |
}, |
}, |
2692 |
}; |
}; |
2693 |
## TODO: noscript in head |
## TODO: noscript in head |
2694 |
|
## TODO: noscript in XHTML |
2695 |
|
|
2696 |
$Element->{$HTML_NS}->{'event-source'} = { |
$Element->{$HTML_NS}->{'event-source'} = { |
2697 |
attrs_checker => $GetHTMLAttrsChecker->({ |
attrs_checker => $GetHTMLAttrsChecker->({ |