中键/值对的任意表标签。有开放标准吗?
是否存在用于在 HTML 元标记中指定任意键/值对表的开放标准(微格式)?
假设我有一个关于颜色的网站,并且有一个关于 5 调色板的页面。我本质上想以第三方服务可以吞噬的格式表达页面中表示的信息。在本例中,调色板由五种颜色组成。就像这样:
<meta name="data" content="color1:'#ffffff',color2:'#ff00ff',color3:'#ffff00',color4:'#00ffff',color5:'#00ff00'" />
我可以推出自己的规范,但如果已经有东西的话,我真的很讨厌这样做。不需要污染网络,这已经是一个阴暗标准的泥潭了...
(ps我很了解RDF。我想在页面本身中指定内容...并且不需要加载另一个文档只是为了数据。)
Is there an open standard (microformats'ish) that exists for specifying an arbitrary table of key/value pairs in an HTML meta tag?
So let's say I had a website about color, and had a page about a 5-color palette. I essentially want to express information represented in the page, in a format that can be gobbled up by third-party services. In this case, it's the five colors that make up the palette. Like this:
<meta name="data" content="color1:'#ffffff',color2:'#ff00ff',color3:'#ffff00',color4:'#00ffff',color5:'#00ff00'" />
I could roll my own specification, but I really hate doing that if there's something already out there. No need to pollute the web, which is already a quagmire of shady standards...
(p.s. I'm well-aware of RDF. I'd like to specify the content in the page itself... and not require loading another document just for the data.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道与
内容相关的任何开放标准,但我认为 如果您想要的只是简单的键/值对,那么 JSON 将是一种很好的格式。
I don't know of any open standards relating to
<meta>
content, but I think JSON would be a fine format to use if all you want are simple key/value pairs.