RDF:我怎样才能 link a schema.org:travelaction:agent:organization 到 health-lifesci.schema.org:MedicalBusiness 子类别?

RDF: How can I link a schema.org:travelaction:agent:organization to a health-lifesci.schema.org:MedicalBusiness subcategory?

我有这样的情况:

<div prefix='schema: http://schema.org/ health-lifesci: https://health-lifesci.schema.org' typeof='schema:TravelAction'>
...  
  <div property='schema:agent' typeof='health-lifesci:Dermatology'>
    <meta property='schema:name' content='My Doctor' />
...
  </div>
</div>

Dermatology 是一个 MedicalBusiness 又是一个 Organization。这显示在 schema.org 的 relevant page 中。

然而,structured data tool 将其识别为 Thing

agent

   @type        Thing

   name         My Doctor

我做错了什么?

Schema.org 扩展,如 health-lifesci,也使用核心命名空间 http://schema.org/.

扩展中的每个术语都列出了应使用的规范 URI。在 http://health-lifesci.schema.org/Dermatology 上它说:

Canonical URL: http://schema.org/Dermatology

所以你的 HTML+RDFa 应该是:

<div prefix='schema: http://schema.org/' typeof='schema:TravelAction'>
  <div property='schema:agent' typeof='schema:Dermatology'>
    <meta property='schema:name' content='My Doctor' />
  </div>
</div>

但是,Dermatology type is not an expected value for the agent property. It expects an Organization or Person value, but Dermatology is neither; it’s a MedicalSpecialty枚举值。

(我不确定为什么 Dermatology 被列为 MedicalBusiness, but without listing this as parent on its page 的 sub-type。)