OA and RDFa (Was: Annotation Serializations)

Dear Ivan and all,
I would start from the example Ivan included in a previous email
http://lists.w3.org/Archives/Public/public-openannotation/2014Jan/0038.html
I also copied it to the Wiki
http://www.w3.org/community/openannotation/wiki/RDFa were we can collect
the results of the discussion.

Here below a couple of initial considerations/exercises. Ivan I am trying
to understand this myself so please chime in and explain where necessary.

1) Target

Current:
<blockquote property="hasTarget"
          resource="http://example.com/sourcedoc.html"
          cite="http://example.com/sourcedoc.html"
          data-prefix="essential feature of the memex. "
          data-suffix=" When the user is building a tra" typeof="">
    <p>The process of tying two items together is the important thing.</p>
    <footer>
          - <cite>
             <a href="http://en.wikipedia.org/wiki/Vannevar_Bush">
                <span>Vannevar Bush</span>
             </a>
        </cite>
    </footer>
</blockquote>

Using the distiller this becomes:
...
"hasTarget": "http://example.com/sourcedoc.html"
...

and not what I would expected given Doug example:
"hasTarget": {
    "@id": "http://example.com/specifictarget/0001",
    "@type": "SpecificResource",
    "hasSelector": {
        "@id": "http://example.com/selector/0001",
        "@type": "TextQuoteSeletor",
        "prefix": "essential feature of the memex. ",
        "match": "The process of tying two items together is the important
thing.",
        "suffix": " When the user is building a tra"
    },
    "hasSource": "http://example.com/sourcedoc.html"
},

Was that intentional? Were you (or Doug) thinking of using 'data-prefix'
and 'data-suffix' as shortcuts?

This is an exercise for a more complete - and more complex! - approach,
which allow the user to add the SpecificResource/Selector info if needed
(only blockquote here):

<blockquote property="hasTarget" resource="
http://example.com/specifictarget/0001"
    typeof="SpecificResource" cite="http://example.com/sourcedoc.html" >
    <details>
        <summary>Source</summary>
        <a property="hasSource" resource="http://example.com/sourcedoc.html"
href="http://example.com/sourcedoc.html">http://example.com/sourcedoc.html
</a>
    </details>
    <div property="hasSelector" resource="http://example.com/selector/0001"
typeof="TextQuoteSeletor">
        <p property="prefix" style="display: none;">essential feature of
the memex. </p>
        <p property="exact">The process of tying two items together is the
important thing.</p>
        <p property="suffix" style="display: none;"> When the user is
building a tra</p>
    <div>
    <footer>
      - <cite>
             <a href="http://en.wikipedia.org/wiki/Vannevar_Bush">
                <span>Vannevar Bush</span>
             </a>
        </cite>
    </footer>
</blockquote>

I am using 'details' defined as 'The details element represents a
disclosure widget from which the user can obtain additional information or
controls.' With the idea that the source could be shown/hidden. Probably
the 'summary' element can be omitted.

This markup - that could be simplified - generates the above JSON-LD
snippet.
It is obviously more complicated.

2) Embedded textual body

Current:
<p property="hasBody" typeof=""><span property="rdf:value">Annotations are
at the Web's core.</span></p>

According to specs - and forgetting dc:format for now - that should be
something like:
<p property="hasBody" typeof="cnt:ContentAsText"><span property="cnt:chars"
>Annotations are at the Web's core.</span></p>
or, assuming to have a RDFS aware processor (as the domain of cnt:chars is
cnt:ContentAsText), just:
<p property="hasBody" typeof=""><span property="cnt:chars">Annotations are
at the Web's core.</span></p>

The above would generate something on the lines of:
hasBody": {
    "@type": "cnt:ContentAsText",
    "cnt:chars": "Annotations are at the Web's core."
},

Again, at this stage, these are incomplete exercises for discussion
purposes.
Comments are more than welcome.

Paolo

Received on Wednesday, 22 January 2014 03:49:00 UTC