문서 (HTML 문서, 어쨌든)에서는 일반적으로 문서의 조각 식별자가되는 @id
특성을 사용하여 섹션 (또는 요소)을 식별 할 수 있습니다. 예를 들어, http://www.w3.org/TR/json-ld/#abstract는 HTML 소스를 보면, 다음과 같은 볼은 "추상적"조각 식별자와 URL입니다 :
<section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter"><h2 aria-level="1" role="heading" id="h2_abstract">Abstract</h2>
<p>JSON is a useful data serialization and messaging format.
This specification defines JSON-LD, a JSON-based format to serialize
Linked Data. The syntax is designed to easily integrate into deployed
systems that already use JSON, and provides a smooth upgrade path from
JSON to JSON-LD.
It is primarily intended to be a way to use Linked Data in Web-based
programming environments, to build interoperable Web services, and to
store Linked Data in JSON-based storage engines.</p>
</section>
(이 중 일부는 자동으로 생성되어 있습니다, 그래서 거기 기타 비 관련 보일러 플레이트도 포함).
이 당신 JSON-LD를 사용하여 문서의 구조를 설명하는 하나의 메커니즘을 제공한다 :이 경우
{
"@id": "http://www.w3.org/TR/json-ld",
"@type": "bibo:Document",
"bibo:chapter": [{
"@id": "#abstract"
}, {
"@id": "#sotd"
}, {
"@id": "#references"
}],
}
참고 상기 JSON-LD는 동일한 URI (URL)가 정의되고 HTML 문서이므로 "#abstract"는 실제로 http://www.w3.org/TR/json-ld#abstract으로 확장되어 해당 섹션을 참조 할 수있는 방법과 섹션 식별자를 제공합니다. 훨씬 더 가능합니다.
RDFa와 JSON-LD 모두 RDF 형식이므로 많은 W3C 사양이 RDFa로 마크 업됩니다. 실제로이 문서를 JSON-LD로 변환 할 수 있습니다. 예를 들어 브라우저에서 다음을 시도하십시오 : http://rdf.greggkellogg.net/distiller?fmt=jsonld&in_fmt=rdfa&uri=http://www.w3.org/TR/json-ld/#abstract.
답장을 보내 주셔서 감사합니다. 나는 MongoDB를 사용하고있다. JsonLD를 사용하여 DB에 링크 된 문서 + 주석을 저장하는 방법을 설명해 주시겠습니까 – DivyaMenon