Hard-coded checks are redundant with updates to attrdict.c
.
This commit is contained in:
parent
429703dce4
commit
74604fd52b
31
src/attrs.c
31
src/attrs.c
|
@ -445,38 +445,11 @@ static uint AttributeVersions(Node* node, AttVal* attval)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
/* HTML5 data-* attributes
|
/* Override or add to items in attrdict.c */
|
||||||
20150118: added allowfullscreen */
|
|
||||||
if (attval && attval->attribute) {
|
if (attval && attval->attribute) {
|
||||||
|
/* HTML5 data-* attributes can't be added generically; handle here. */
|
||||||
if (TY_(tmbstrncmp)(attval->attribute, "data-", 5) == 0)
|
if (TY_(tmbstrncmp)(attval->attribute, "data-", 5) == 0)
|
||||||
return (XH50 | HT50);
|
return (XH50 | HT50);
|
||||||
if (strcmp(attval->attribute,"allowfullscreen") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
/* RDFa global attributes */
|
|
||||||
if (strcmp(attval->attribute,"about") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"datatype") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"inlist") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"prefix") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"property") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"resource") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"typeof") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
if (strcmp(attval->attribute,"vocab") == 0)
|
|
||||||
return (XH50 | HT50);
|
|
||||||
/* Override the settings on these attributes because
|
|
||||||
* they are allowed everywhere by RDFa */
|
|
||||||
if (strcmp(attval->attribute,"content") == 0)
|
|
||||||
return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ;
|
|
||||||
if (strcmp(attval->attribute,"rel") == 0)
|
|
||||||
return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ;
|
|
||||||
if (strcmp(attval->attribute,"rev") == 0)
|
|
||||||
return (HT20|HT32|H40T|H41T|X10T|H40F|H41F|X10F|H40S|H41S|X10S|XH11|XB10|HT50|XH50) ;
|
|
||||||
}
|
}
|
||||||
/* TODO: maybe this should return VERS_PROPRIETARY instead? */
|
/* TODO: maybe this should return VERS_PROPRIETARY instead? */
|
||||||
if (!attval || !attval->dict)
|
if (!attval || !attval->dict)
|
||||||
|
|
Loading…
Reference in a new issue