Add example inspired from stackoverflow for QA proposal default tip
authorscor <scorlosquet@gmail.com>
Fri, 14 Mar 2014 12:03:13 -0400
changeset 179 b4c3ad199322
parent 178 0a08944ed09f
Add example inspired from stackoverflow for QA proposal
schema.org/ext/QA-example-stackoverflow.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/schema.org/ext/QA-example-stackoverflow.html	Fri Mar 14 12:03:13 2014 -0400
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Web Schemas TF: Schema.org tests: test 1 (format md)</title>
+</head>
+<body itemscope itemtype="http://schema.org/QAPage">
+
+  <!-- inspired from https://stackoverflow.com/questions/4370960/what-is-attr-accessor-in-ruby -->
+  <div itemscope itemtype="http://schema.org/Question">
+    <h1 itemprop="name">What is attr_accessor in Ruby?</h1>
+    <!-- Uses a new made-up property 'voteCount' because stackoverflow doesn't show up/down votes,
+         see http://lists.w3.org/Archives/Public/public-vocabs/2014Feb/0088.html -->
+    <div itemprop="voteCount">196</div>
+    <!-- There is uncertainty around description vs. text, probably not something we
+    should solve in this proposal though. Using text for now -->
+    <div itemprop="text">I am having a hard time understanding attr_accessors in Ruby, can someone explain them to me? I have done tons of Google searches, just can't understand them fully.</div>
+    <div>asked <time itemprop="dateCreated" datetime="2010-12-06T21:07Z">Dec 6 '10 at 21:07</time></div>
+    <div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">dennismonsewicz</span></div>
+    <div><span itemprop="answerCount">6</span> answers</div>
+
+    <div itemprop="suggestedAnswer acceptedAnswer" itemscope itemtype="http://schema.org/Answer">
+      <div itemprop="voteCount">542</div>
+      <div itemprop="text">
+        Let's say you have a class Person.
+        class Person
+        end
+        person = Person.new
+        person.name # => no method error
+
+        Obviously we never defined method name. Let's do that.
+      </div>
+      <div>answered <time itemprop="dateCreated" datetime="2010-12-06T22:11Z">Dec 6 '10 at 22:11</time></div>
+      <div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">hakunin</span></div>
+    <div>
+
+    <div itemprop="suggestedAnswer" itemscope itemtype="http://schema.org/Answer">
+      <div itemprop="voteCount">39</div>
+      <div itemprop="text">
+        attr_accesssor is just a method. (The link should provide more insight with how it works - look at the pairs of methods generated, and a tutorial should show you how to use it.)
+      </div>
+      <div>answered <time itemprop="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
+      <div itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">user166390</span></div>
+    <div>
+
+
+  </div>
+
+</body>
+</html>