Giter Site home page Giter Site logo

Comments (6)

iherman avatar iherman commented on July 20, 2024

I have run the RDFa Generation algorithm by hand, and this is what I got:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Blog</title>
    <base href="http://blog.example.com/progress-report">
</head>
<body>
    <article vocab="https://schema.org/" typeof="BlogPosting">
        <header>
            <h1 property="headline">Progress report</h1>
            <p><time property="datePublished" datetime="2013-08-29">today</time></p>
            <link property="url" href="?comments=0">
        </header>
        <p>All in all, he's doing well with his swim lessons. The biggest thing was he had trouble
        putting his head in, but we got it down.</p>
        <section>
            <h1>Comments</h1>
            <article property="comment" vocab="https://schema.org/" typeof="Comment" id="c1">
                <link property="url" href="#c1">
                <footer>
                    <p>
                        Posted by: <span property="creator" vocab="https://schema.org/" typeof="Person">
                                        <span property="name">Greg</span>
                                   </span>
                    </p>
                    <p><time property="dateCreated" datetime="2013-08-29">15 minutes ago</time></p>
                </footer>
                <p>Ha!</p>
            </article>
            <article property="comment" vocab="https://schema.org/" typeof="Comment" id="c2">
                <link property="url" href="#c2">
                <footer>
                    <p>
                        Posted by: <span property="creator" vocab="https://schema.org/" typeof="Person">
                                        <span property="name">Charlotte</span>
                                   </span>
                    </p>
                    <p><time property="dateCreated" datetime="2013-08-29">5 minutes ago</time></p>
                </footer>
                <p>When you say "we got it down"...</p>
            </article>
        </section>
    </article>
</body>
</html>

I have also run it through my RDFa converter to produce turtle. I do not think that the turtle result should be in the document, but I have put it up in a separate gist.

from microdata.

iherman avatar iherman commented on July 20, 2024

@gkellogg, can you compare the Turtle output of your JSON-LD tool with the the example in turtle via RDFa? The two graphs should be equivalent...

(B.t.w., we may want to think about a testing environment whereby the conversions to RDFa and the conversions to JSON-LD would be compared as for their RDF representations to see whether they are equivalent. If not, we have a problem...)

from microdata.

iherman avatar iherman commented on July 20, 2024

(Just a small editorial remark: in the example above I added a <base> element to the header to ensure using the right URL in the generated RDF.)

from microdata.

chaals avatar chaals commented on July 20, 2024

Think it makes sense to have several examples, and definitely work the same ones for each conversion. I've assigned myself (but please feel free to generate Pull Requests that do some of the work me ;) )...

from microdata.

gkellogg avatar gkellogg commented on July 20, 2024

@iherman, I recommend you to my distiller for checking out different examples. It has up-to-date algorithms, and allows you to invoke the specific Microdata to RDFa and to JSON-LD algorithms (at least as I've implemented them).

from microdata.

danbri avatar danbri commented on July 20, 2024

JSON-LD section has gone, so this is no longer needed.

from microdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.