1

Common-Tags のドキュメントを読んだとき、例がカット アンド ペーストされていたので、これを jsp に入れるのは簡単だろうと思いました。

<body xmlns:ctag="http://commontag.org/ns#" rel="ctag:tagged">
   <span typeof="ctag:Tag" 
         rel="ctag:means" 
         resource="http://rdf.freebase.com/ns/en.u2" 
         property="ctag:label" content="U2"/>
    </span>
</body>

開発作業で Eclipse を使用しているのは良いことです。マークアップに何か問題があることを示しています。Common-tags マークアップに下線が引かれ、黄色が返されます。

Undefined attribute name

ここで何が欠けていますか?またはこれは完全に大丈夫ですか?

4

2 に答える 2

1

The typeof, resource and property attributes are extensions to XHTML which are part of the RDFa specification which is why Eclipse doesn't know about them.

Since RDFa+XHTML is now a W3C recommendation this is absolutely fine to use as is.

http://www.w3.org/TR/rdfa-syntax/#rdfa-attributes

于 2009-10-09T07:30:59.450 に答える
0

XML MIME タイプでページを送信していないと思います。そのスニペットは整形式ではないからです。text/html MIME タイプを使用する場合、RDFa の使用は許可されません。別の方法については、「microdata」をご覧ください。

于 2009-10-09T16:52:55.517 に答える