xml – 产品的RDFa内容实现
我是噩梦中的膝盖深处,这是产品信息的RDFa实施,如果有人能提供一些见解我很好奇.
谷歌表示,不是为了向机器提供数据而隐藏信息,除非它是特定于机器的信息.为了提供这些数据,我找不到任何有关空元素的信息. 如果你看一下商业的GoodRelations RDFa生成器,你会得到一堆嵌套的div,你被告知放在你的项目页面的底部.我将使用我最喜欢的网站之一: <div xmlns="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:gr="http://purl.org/goodrelations/v1#" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <div typeof="gr:Offering" about="#offering"> <div rev="gr:offers" resource="#company"></div> <div property="rdfs:label" content="Alpinestars S-MX Plus Racing Boots" xml:lang="en"></div> <div property="rdfs:comment" content="Alpinestars’ S-MX Plus racing boot raises performance and safety to new and unmatched levels with its innovative design,structural protection and comfort." xml:lang="en"></div> <div property="gr:hasEAN_UCC-13" content="0000000000000" datatype="xsd:string"></div> <div rel="foaf:depiction" resource="http://www.motorcycle-superstore.com/ProductImages/300/g17268.jpg"></div> <div rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#Sell"></div> <div rel="gr:hasPriceSpecification"> <div typeof="gr:UnitPriceSpecification"> <div property="gr:hasCurrency" content="USD" datatype="xsd:string"></div> <div property="gr:hasCurrencyValue" content="349.95" datatype="xsd:float"></div> <div property="gr:hasUnitOfMeasurement" content="C62" datatype="xsd:string"></div> </div> </div> <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#PayPal"></div> <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#AmericanExpress"></div> <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#Discover"></div> <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#MasterCard"></div> <div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#VISA"></div> <div rel="foaf:page" resource="http://www.motorcycle-superstore.com/1/1/36/77/ITEM/Alpinestars-S-MX-Plus-Racing-Boots.aspx"></div> </div> </div> 我觉得有趣的是它们的实现 – 百思买已经取得了巨大成功 – 是标签中没有实际内容,而只是内容属性. 那么我的问题是,是否有人对这种类型的实现有任何了解,以及使用一个利用content属性而不是将RDFa结构添加到现有标记的空div结构是否会受到惩罚? 解决方法
这是“片段样式”中的RDFa.充分论证&背景在这里
http://www.ebusiness-unibw.org/tools/rdf2rdfa/ 和这里: 赫普,马丁;加西亚,罗伯托; Radinger,Andreas:RDF2RDFa:将RDF转换为片段以进行复制和粘贴,技术报告TR-2009-01,2009. 基本上,在a)重用可见内容进行数据标记和b)关注点分离之间存在权衡.只要数据结构和可见内容标记的组织几乎匹配1:1,您就可以轻松地使用传统风格的RDFa.但是,在丰富的元数据建模中强制执行可见标记的结构会产生混乱的标记,难以维护,容易出错. 最好的祝愿 马丁赫普 增加:尽管各个DOCTYPE的标准化状态不同,但您可以在XHTML,HTML5和HTML4模板中使用RDFa中的GoodRelations.以下是正确的DOCTYPE设置: > XHTML: b)将html版本属性设置为XHTML RDFa1.0 > HTML5 请注意,这只是现阶段的W3C工作草案,但应该可行. >其他HTML标记 要么 也可以看看: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |