Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Avoid creating recursive nodes for self-referencing objects. Fixes #46. #47

Merged
merged 1 commit into from
Jan 7, 2015
Merged

Avoid creating recursive nodes for self-referencing objects. Fixes #46. #47

merged 1 commit into from
Jan 7, 2015

Conversation

victorandree
Copy link
Contributor

This addresses the simplest case of a self-referencing object:

    <div vocab="http://schema.org/" about="http://example.com">
      <a href="http://example.com" property="url">Name</a>
    </div>

However, by tracking ancestors, it also addresses an issue where some child would try to draw its ancestors and thus itself, et cetera:

    <article vocab="http://schema.org/" about="http://example.com">
      <h1 property="name">Example</h1>

      <section rel="department">
        <h1>Departments</h1>
        <article about="http://example.com/department1">
          <h1 property="name">Department 1</h1>
          <span property="memberOf" resource="http://example.com"></span>
        </article>
      </section>
    </article>

This addresses the simplest case of a self-referencing object:

		<div vocab="http://schema.org/" about="http://example.com">
		  <a href="http://example.com" property="url">Name</a>
		</div>

However, by tracking ancestors, it also addresses an issue where some child would try to draw its ancestors and thus itself, et cetera:

		<article vocab="http://schema.org/" about="http://example.com">
		  <h1 property="name">Example</h1>

		  <section rel="department">
		    <h1>Departments</h1>
		    <article about="http://example.com/department1">
		      <h1 property="name">Department 1</h1>
		      <span property="memberOf" resource="http://example.com"></span>
		    </article>
		  </section>
		</article>
gkellogg added a commit that referenced this pull request Jan 7, 2015
Avoid creating recursive nodes for self-referencing objects. Fixes #46.
@gkellogg gkellogg merged commit 62c634c into rdfa:master Jan 7, 2015
@victorandree victorandree deleted the fix-46 branch January 8, 2015 10:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants