Which more extensions of HTML5 are “default” and n

2019-04-02 00:27发布

There are many questions here, like this one, asking about attributes that not are defined in the HTML5 spec. All the HTML+RDFa attributes, like vocab, typeOf and property, are "valid by default", without necessity of an namespace mechanism.

So, the problem: if it is a "valid HTML5" attribute (or element), and it is not in the HTML5 spec, how can I (or my algorithm) know that it is valid?

There are another W3C spec saying "hello, this is a list of current specifications that are affected by other current specifications" (mutually affected specs)?


NOTES

Perhaps W3C uses some principle as "ignorantia legis neminem excusat" (Latin for "ignorance of the law excuses no one") of the Civil law countries (?)... So, in this case, W3C have obligation to show that "list of mutually affected specs" above.

The context here have no specific Stackoverflow-tags. Is something like "interoperating standards" or "agreement between W3C specifications of the same group"... or "inter-spec recommendations".

1条回答
Evening l夕情丶
2楼-- · 2019-04-02 00:55

This question goes to the heart of what it means for a document to be "valid". Although we, in common parlance talk of validity, the HTML5 spec does not actually use the term "valid" but "conformance". That is, it says that an HTML document conforms or does not conform to the specific requirements laid out in the specification. It also says something about extensibility which is very illuminating:

When vendor-neutral extensions to this specification are needed, either this specification can be updated accordingly, or an extension specification can be written that overrides the requirements in this specification. When someone applying this specification to their activities decides that they will recognise the requirements of such an extension specification, it becomes an applicable specification for the purposes of conformance requirements in this specification.

Note: Someone could write a specification that defines any arbitrary byte stream as conforming, and then claim that their random junk is conforming. However, that does not mean that their random junk actually is conforming for everyone's purposes: if someone else decides that that specification does not apply to their work, then they can quite legitimately say that the aforementioned random junk is just that, junk, and not conforming at all. As far as conformance goes, what matters in a particular community is what that community agrees is applicable.

What that means is that whether an element or attribute is valid or not is not absolute but depends on the community that wishes to apply specific rules or not. So it is with the RDFa attributes: they're valid if you want them to be, not if you don't. Within the wider community, what elements are considered valid can change over time. If RDFa falls out of use, then they will be effectively invalid. If RDFa grows in popularity, then those attributes become valid to a wider community.

So, its effectively meaningless to talk of a document that defines which current specs form a full set of validity requirements. The set necessarily depends on any extant specs that are accepted as defining validity for each community.

查看更多
登录 后发表回答