structured-data

Why does Google Testing Tool use the “id” attribute to generate a URL for the Microdata item?

笑着哭i 提交于 2019-11-27 09:44:19
I'm using some Microdata to describe a blog post, and I'm surprised by the value return for Schema.org’s BlogPosting by the Google Developers Testing Tool. I would have expected it to be the itemprop url , not a merge of the website URL and the item id . Am I doing something wrong, or is it only a Google display issue? <div itemscope="itemscope" itemprop="blogPost" itemtype="http://schema.org/BlogPosting" id="foobar"> <a itemprop="url" href="/realone">real</a> </div> Value returned by https://developers.google.com/structured-data/testing-tool/ : BlogPosting: http://www.example.com/foobar url:

Can Schema.org Expected Types be collections, too?

时光毁灭记忆、已成空白 提交于 2019-11-27 04:52:41
问题 A Schema.org object of type Person can have a sameAs property of type URL. According to Google's structured data site, the sameAs property can be a single item or an array. The docs on Schema.org do not mention whether sameAs can be a single item or an array. Is this just Google deviating from Schema.org? Or is it the case that all properties in Schema.org can be single items or arrays? 回答1: Every Schema.org property can have multiple values. It doesn’t necessarily make sense for some

When can I save JSON or XML data in an SQL Table

倾然丶 夕夏残阳落幕 提交于 2019-11-26 22:02:01
When using SQL or MySQL (or any relational DB for that matter) - I understand that saving the data in regular columns is better for indexing sake and other purposes... The thing is loading and saving JSON data is sometimes a lot more simple. and makes the development easier. Are there any "golden rules" for saving raw JSON data in the DB? is it absolutely wrong practice to do so? SUMMARY Very nice answers were given, but no doubt the most well organized is the answer given by @Shnugo which deserves the bounty. Would also like to point out answers given by @Gordon Linoff and @Amresh Pandey for

JSON-LD and Microdata on the same page?

流过昼夜 提交于 2019-11-26 21:38:33
问题 I have both Micro Data and JSON-LD on my e-commerce product pages, describing the same thing (products in my case). For reasons beyond the scope of this question, I cannot remove either of the two formats. I am wondering: Is this a problem for Google? The structured data testing tool does display two items (products) instead of one. If one property, let's say the name of the product, is slightly different between the two formats, would any of the two formats, for example, JSON-LD take

Why does Google Testing Tool use the “id” attribute to generate a URL for the Microdata item?

☆樱花仙子☆ 提交于 2019-11-26 17:52:04
问题 I'm using some Microdata to describe a blog post, and I'm surprised by the value return for Schema.org’s BlogPosting by the Google Developers Testing Tool. I would have expected it to be the itemprop url , not a merge of the website URL and the item id . Am I doing something wrong, or is it only a Google display issue? <div itemscope="itemscope" itemprop="blogPost" itemtype="http://schema.org/BlogPosting" id="foobar"> <a itemprop="url" href="/realone">real</a> </div> Value returned by https:/

When can I save JSON or XML data in an SQL Table

混江龙づ霸主 提交于 2019-11-26 08:03:06
问题 When using SQL or MySQL (or any relational DB for that matter) - I understand that saving the data in regular columns is better for indexing sake and other purposes... The thing is loading and saving JSON data is sometimes a lot more simple. and makes the development easier. Are there any \"golden rules\" for saving raw JSON data in the DB? is it absolutely wrong practice to do so? SUMMARY Very nice answers were given, but no doubt the most well organized is the answer given by @Shnugo which

How to extract information from a Wikipedia infobox?

你离开我真会死。 提交于 2019-11-26 04:52:31
There is this fancy infobox in <some Wikipedia article>. How do I get the value of <this field and that>? Tgr The wrong way: trying to parse HTML Use (cURL/jQuery/file_get_contents/requests/wget/ more jQuery ) to fetch the HTML article code of the article, then use a DOM parser to extract table.infobox tr[3] td / use a regex . This is actually a really bad idea most of the time. Wikipedia's HTML code is not particularly parsing-friendly (especially infoboxes which are a system of hand-written templates), the exact structure changes from infobox to infobox, and the structure of an infobox might

How to extract information from a Wikipedia infobox?

大城市里の小女人 提交于 2019-11-26 01:49:49
问题 There is this fancy infobox in <some Wikipedia article>. How do I get the value of <this field and that>? 回答1: The wrong way: trying to parse HTML Use (cURL/jQuery/file_get_contents/requests/wget/more jQuery) to fetch the HTML article code of the article, then use a DOM parser to extract table.infobox tr[3] td / use a regex. This is actually a really bad idea most of the time. Wikipedia's HTML code is not particularly parsing-friendly (especially infoboxes which are a system of hand-written