如何让JSON-LD中table:columns的description解析为mkdocs:description?
JSON-LD表格数据解析问题
我在JSON-LD playground中测试了一份描述表格数据的文档,原文档内容如下:
{ "@context": { "mkdocs": "https://mkdocs.iolanta.tech/", "table": "https://mkdocs.iolanta.tech/tables/", "description": "mkdocs:description", "table:rows": { "@type": "@id" }, "table:columns": { "@id": "table:columns", "@type": "@id", "@container": "@list" } }, "$id": "table", "table:columns": [ "description" ], "table:rows": [ { "description": "foo" } ] }
我期望术语description能解析为mkdocs:description,但展开后的结果显示并非所有场景都生效:
[ { "https://mkdocs.iolanta.tech/tables/columns": [ { "@list": [ { "@id": "https://dvcs.w3.org/hg/json-ld/raw-file/default/playground/description" } ] } ], "https://mkdocs.iolanta.tech/tables/rows": [ { "https://mkdocs.iolanta.tech/description": [ { "@value": "foo" } ] } ] } ]
在table:rows块中,description作为键能正确解析为https://mkdocs.iolanta.tech/description;但在table:columns块中,description作为值却被解析为https://dvcs.w3.org/hg/json-ld/raw-file/default/playground/description。我推测这是因为两者的角色(键/值)不同。
请问是否可以构造JSON-LD描述,让table:columns中的description解析为mkdocs:description,同时让其他任意关键词(如some-random-column)基于文档的基准URL解析?
内容的提问来源于stack exchange,提问作者Anatoly Scherbakov
相关产品推荐
相关产品推荐

