아래의 두 코드 단편은 사용자에게는 보이지 않지만 GSDTT에는 잘 파싱됩니다. 이제 visible.xml의 구조화 된 데이터
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"mainEntity":{
"@type": "Book",
"author": "Plato",
"bookFormat": "http://schema.org/Paperback",
"datePublished": "2001-01-15",
"image": "plato-cover.jpg",
"inLanguage": "English",
"numberOfPages": "224",
"review": [
{
"@type": "Review",
"author": "John Doe",
"datePublished": "2001-01-16",
"name": "O. Talp",
"reviewBody": "A lovely read."
}
]
}
}
</script>
구조화 된 데이터 느릅 나무가 들어 아래의 코드를 고려
<div>
<div itemtype="http://schema.org/WebPage" itemscope>
<div itemprop="mainEntity" itemtype="http://schema.org/Book" itemscope>
<meta itemprop="datePublished" content="2001-01-15" />
<meta itemprop="bookFormat" content="http://schema.org/Paperback" />
<link itemprop="image" href="http://rdf-translator.appspot.com/plato-cover.jpg" />
<meta itemprop="author" content="Plato" />
<meta itemprop="numberOfPages" content="224" />
<meta itemprop="inLanguage" content="English" />
<div itemprop="review" itemtype="http://schema.org/Review" itemscope>
<meta itemprop="name" content="Old is new again" />
<meta itemprop="reviewBody" content="A lovely read." />
<meta itemprop="author" content="O. Talp" />
<meta itemprop="datePublished" content="2001-01-16" />
</div>
</div>
</div>
또한 사용자 visble이다; 그것은
GSDTT 잘 구문 분석 : 그것은
를 구조화 된 데이터를 포함하고 표시 출력을 생성하기 때문에
<div itemtype="http://schema.org/WebPage" itemscope>
<div itemprop="mainEntity" itemtype="http://schema.org/Book" itemscope>
<p itemprop="datePublished" content="2001-01-15">Published: 2001-01-15 </p>
<p itemprop="bookFormat" content="http://schema.org/Paperback" />Format: Paperback </p>
<img itemprop="image" src="https://nl.wikipedia.org/wiki/Plato#/media/File:Plato_Pio-Clemetino_Inv305.jpg" >
<p itemprop="author" content="Plato" >Author: Plato</p>
<p itemprop="numberOfPages" content="224" >Pages: 224</p>
<p itemprop="inLanguage" content="English" >Language: English</p>
<div itemprop="review" itemtype="http://schema.org/Review" itemscope>
<p><strong>Review</strong></p>
<p itemprop="name" content="Old is new again" >Old is nieuw again</p>
<p itemprop="reviewBody" content="A lovely read.">A lovely read.</p>
<p itemprop="author" content="O. Talp">Author: O. Talp</p>
<p itemprop="datePublished" content="2001-01-16">Published: 2001-01-16</p>
</div>
</div>
</div>
나는 마지막의 코드를 선호 할 것입니다. 그럼에도 불구하고 마이크로 데이터는 더 이상 사용되지 않거나 조만간 출시 될 예정입니다. 사용자에게 표시되는 구조화 된 HTML 데이터를 만드는 것이 가장 좋은 방법은 무엇입니까?
왜 Microdata가 더 이상 사용되지 않을 것이라고 생각합니까? – unor
물어봐 줘서 고마워. schema.org가 항상 마이크로 데이터 예제를 제공하지는 않기 때문에 필자는 틀린 가정을했다. – iep