Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong element data object for typed child #4

Open
alexmilowski opened this issue Oct 16, 2014 · 1 comment
Open

Wrong element data object for typed child #4

alexmilowski opened this issue Oct 16, 2014 · 1 comment

Comments

@alexmilowski
Copy link
Owner

In the follow example, the schema:Organization typed child doesn't not have the right .data value on the element. It has the schema:Person instance instead of its own.

<div typeof="Person">
      <p property="name">Alex Milowski</p>
      <div property="affiliation" resource="http://ischool.berkeley.edu/" typeof="Organization">
          <p><span property="department">School of Information</span>, <span property="name">University of California, Berkeley</span></p>
      </div>
 </div>
@sballesteros
Copy link

This has been resolved right?

Running

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
  </head>
  <body>
    <div vocab="http://schema.org/">
      <div typeof="Person">
        <p property="name">Alex Milowski</p>
        <div property="affiliation" resource="http://ischool.berkeley.edu/" typeof="Organization">
          <p><span property="department">School of Information</span>, <span property="name">University of California, Berkeley</span></p>
        </div>
      </div>
    </div>
    <script src="green-turtle/build/RDFa.js"></script>
  </body>
</html>

Produces (document.data.graph.toString() in the console) the right data:

_:1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person>;
 <http://schema.org/name> "Alex Milowski";
 <http://schema.org/affiliation> <http://ischool.berkeley.edu/> .

 <http://ischool.berkeley.edu/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Organization>;
 <http://schema.org/department> "School of Information";
 <http://schema.org/name> "University of California, Berkeley" .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants