Skip to content

Parsing external content into a graph #6

Description

@betehess

My goal is to parse some external content into a graph, and to have some control over the graph implementation being used.

So I have tried the following in the Chrome console, from the test harness:

var input = '<html><head><title>titleTest</title></head><body> <div vocab="http://schema.org/" typeof="Invoice">  <h1 property="description">January 2015 Visa</h1>  <link property="url" href="http://acmebank.com/invoice.pdf" />Invoice PDF  <div property="broker" itemscope typeof="http://schema.org/BankOrCreditUnion">    <b property="name">ACME Bank</b>  </div>  <span property="accountId">xxxx-xxxx-xxxx-1234</span>  <div property="customer" typeof="http://schema.org/Person">    <b property="name">Jane Doe</b>  </div>  <span property="paymentDue">2015-01-30</span>  <div property="minimumPaymentDue" typeof="http://schema.org/PriceSpecification">    <span property="price">15.00</span>    <span property="priceCurrency">USD</span>  </div>  <div property="totalPaymentDue" typeof="http://schema.org/PriceSpecification">    <span property="price">200.00</span>    <span property="priceCurrency">USD</span>  </div>  <meta property="billingPeriod" content="2014-12-21/P30D" />starts:2014-12-21 30 days  <span property="paymentStatus">payment due</span></div> </body></html>'
undefined

var parser=new DOMParser();
undefined

var foo = parser.parseFromString(input, 'text/html')
undefined

GreenTurtle.attach(foo)
Uncaught Bad URI value, no scheme:

GreenTurtle.attach(foo, {baseURI: 'http://example.com'})
Uncaught Bad URI value, no scheme:

I have a few additional questions:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions