在關於視頻網站的項目中,我必須準備關於有資格查看視頻資料的國家/地區的信息。schema.org的「eligibleRegion = All Countries」的最小標記
提供此信息的標記是這樣的:
<span itemprop="eligibleRegion" itemscope itemtype="http://schema.org/Country">
<meta itemprop="name" content="DE" />
</span>
<span itemprop="eligibleRegion" itemscope itemtype="http://schema.org/Country">
<meta itemprop="name" content="FR" />
</span>
然而,也有說是在所有國家享有視頻產品衆多量。所以,顯而易見的行動是重複上述標記大約200次,這似乎不是最好的解決方案。
是否有可能實現相同的結果[所有國家/地區的產品的可用性],但數據量要少得多?
喜歡的東西:
<span itemprop="eligibleRegion" itemscope itemtype="http://schema.org/Country">
<meta itemprop="name" content="[allCountries] or [allRegions]" />
</span>
一個可能的解決
一個可行的辦法進入我的腦海裏是從https://schema.org/geoRadius使用geoRadius並指定一個非常大的半徑爲它(?! )
<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCircle">
<div itemprop="geoMidpoint" itemscope itemtype="http://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="42.362757" />
<meta itemprop="longitude" content="-71.087109" />
</div>
<meta itemprop="geoRadius" content="[100000....]" />
</div>
然而這似乎並不是很整潔的解決方案。
謝謝** @ unor **:但問題是我們要明確指出區域_ [因爲大部分視頻僅在某些國家/地區提供] _。因此,必須明確界定這些國家 - 在某些情況下,這些國家是全球的_allCountries_。 – user319730
@ user319730:我認爲除了列出所有相關的ISO 3166代碼或使用包含GeoShape/GeoCircle的全部值以外,沒有其他(機器可理解的)選項。 - 如果你不需要這樣做,你可以使用'ineligibleRegion'並且只提供一個不再存在的國家的一個ISO 3166代碼。 – unor