以下(缩短的)脚本在Google's Structured Data Testing Tool中返回2个错误,我不知道为什么。我按照here中的示例代码进行操作,但不知怎的,它不起作用。
<!DOCTYPE HTML>
<html>
<body>
<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gr="http://purl.org/goodrelations/v1#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:review="http://purl.org/stuff/rev#"
xmlns:v="http://rdf.data-vocabulary.org/#">
<div typeof="gr:Offering" about="#offeringdata">
<div rel="foaf:page" resource=""></div>
<div rev="gr:offers" resource="#companydata"></div>
<div property="gr:name" content="" ></div>
<div property="gr:description" content="" ></div>
<div property="gr:hasStockKeepingUnit" content="" datatype="xsd:string"></div>
<div rel="gr:includes">
<div typeof="gr:SomeItems" about="#productdata">
<div property="gr:name" content="" ></div>
<div property="gr:description" content="" ></div>
<div rel="foaf:depiction v:image" resource=""></div>
<div property="gr:hasStockKeepingUnit" content="" datatype="xsd:string"></div>
<div property="gr:category" content="" ></div>
</div>
</div>
<div rel="gr:hasPriceSpecification">
<div typeof="gr:UnitPriceSpecification">
<div property="gr:validFrom" content="2015-08-11T16:34:02Z" datatype="xsd:dateTime"></div>
<div property="gr:validThrough" content="2015-08-11T16:34:02Z" datatype="xsd:dateTime"></div>
<div property="gr:hasUnitOfMeasurement" content="C62" datatype="xsd:string"></div>
<div property="gr:hasCurrency" content="EUR" datatype="xsd:string"></div>
<div property="gr:hasCurrencyValue" content="95.8" datatype="xsd:float"></div>
</div>
</div>
<div property="gr:validFrom" content="2015-08-11T16:34:02Z" datatype="xsd:dateTime"></div>
<div property="gr:validThrough" content="2015-08-11T16:34:02Z" datatype="xsd:dateTime"></div>
<div property="gr:eligibleRegions" content="AD" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="BE" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="BG" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="DK" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="DE" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="EE" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="FI" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="FR" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="GR" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="VA" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="IE" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="IT" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="HR" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="LV" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="LI" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="LT" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="LU" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="MT" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="MC" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="NL" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="NO" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="AT" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="PL" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="PT" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="RO" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="SM" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="SE" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="CH" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="SK" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="SI" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="ES" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="CZ" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="HU" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="GB" datatype="xsd:string"></div>
<div property="gr:eligibleRegions" content="CY" datatype="xsd:string"></div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#COD"></div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#VISA"></div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#MasterCard"></div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#ByBankTransferInAdvance"></div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#ByInvoice"></div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#DirectDebit"></div>
<div rel="gr:acceptedPaymentMethods" resource="">
</div>
<div rel="gr:acceptedPaymentMethods" resource="http://purl.org/goodrelations/v1#DirectDebit"></div>
<div rel="gr:acceptedPaymentMethods" resource="">
</div>
<div rel="gr:acceptedPaymentMethods" resource="">
</div>
<div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeFreight"></div>
<div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeFreight"></div>
<div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeFreight"></div>
<div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeFreight"></div>
<div rel="gr:availableDeliveryMethods" resource="http://purl.org/goodrelations/v1#DeliveryModeFreight"></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="gr:hasPriceSpecification" resource=""></div>
<div rel="foaf:depiction v:image" resource=""></div>
</div>
</div>
</body>
</html>
任何人都知道为什么?
答案 0 :(得分:0)
您正在使用Google结构化数据测试工具,该工具在使用Good Relations词汇表时需要http://schema.org词汇量。遗传资源定义于2011年发布,而2012年11月,良好关系词汇被添加到Schema.org版本v0.99中。公告为http://blog.schema.org/2012/11/good-relations-and-schemaorg.html。采用Schema.org词汇表,使用Google SDTT可以获得更好的结果。