RDFa为
然而,HTML5规范似乎禁止这种用法。我不是在谈论它是否允许
<meta>
元素引入了property
属性,W3C甚至推荐将其作为HTML5的扩展。例如,Facebook的Open Graph协议就是使用RDFa的property
属性,如下所示(来自Open Graph网站的示例):<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
…
然而,HTML5规范似乎禁止这种用法。我不是在谈论它是否允许
property
属性;我指的是对于<meta>
元素,如果没有name
属性,则明确禁止使用content
属性:
如果指定了
name
或http-equiv
中的任意一个,则必须同时指定content
属性。否则,必须省略content
属性。
这难道不与Open Graph等当前RDFa用法直接冲突吗?HTML5规范似乎也要求此处同时存在name
属性。
fooBar()
方法具有public
可见性,然后子类试图使用可见性private
覆盖该方法一样(参见LSP)。一个“扩展”能否撤销禁令? - Garret Wilson