Re: RDFa syntax for Hacking the VIEjs content enhancement Demo for Drupal 7 to include RDFa annotations

I don’t know if you tried my RDF Distiller [1]; It can translate between most RDF formats, including to RDFa. This is what I get as one possible serialization:

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <base href=''>
    <title>Salzburg Research Forschungsgesellschaft mbH</title>
    <link href='http://rdf.kellogg-assoc.com/css/distiller.css' rel='stylesheet' type='text/css'>
    <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' type='text/javascript'></script>
    <script src='http://rdf.kellogg-assoc.com/js/distiller.js' type='text/javascript'></script>
  </head>
  <body>
    <p>RDFa serialization URI base: &lt;&gt;</p>
    <td resource='http://localhost/iksce/node/10' typeof='http://rdfs.org/sioc/ns#Item http://xmlns.com/foaf/0.1/Document'>
      <span class='type'>http://rdfs.org/sioc/ns#Item http://xmlns.com/foaf/0.1/Document</span>
      <table class='properties'>
        <h1 property='http://purl.org/dc/terms/title'>Salzburg Research Forschungsgesellschaft mbH</h1>
        <tr class='property'>
          <td class='label'>
            http://purl.org/dc/terms/created
          </td>
          <td content='2012-12-05T19:37:15-05:00' datatype='http://www.w3.org/2001/XMLSchema#dateTime' property='http://purl.org/dc/terms/created'>07:37:15 PM -05:00 on Wednesday, 05 December 2012</td>
        </tr>
        <tr class='property'>
          <td class='label'>
            http://purl.org/dc/terms/date
          </td>
          <td content='2012-12-05T19:37:15-05:00' datatype='http://www.w3.org/2001/XMLSchema#dateTime' property='http://purl.org/dc/terms/date'>07:37:15 PM -05:00 on Wednesday, 05 December 2012</td>
        </tr>
        <tr class='property'>
          <td class='label'>
            http://purl.org/dc/terms/modified
          </td>
          <td content='2016-01-22T22:14:40-05:00' datatype='http://www.w3.org/2001/XMLSchema#dateTime' property='http://purl.org/dc/terms/modified'>10:14:40 PM -05:00 on Friday, 22 January 2016</td>
        </tr>
        <tr class='property'>
          <td class='label'>
            http://purl.org/rss/1.0/modules/content/encoded
          </td>
          <td rel='http://purl.org/rss/1.0/modules/content/encoded' resource='_:g70119879425560' typeof='http://www.w3.org/XML/1998/namespacep'>
            <span class='type'>http://www.w3.org/XML/1998/namespacep</span>
            <table class='properties'>
              <tr class='property'>
                <td class='label'>
                  http://www.w3.org/XML/1998/namespacea
                </td>
                <td property='http://www.w3.org/XML/1998/namespacea'>Austria</td>
              </tr>
            </table>
          </td>
        </tr>
        <tr class='property'>
          <td class='label'>
            http://rdfs.org/sioc/ns#has_creator
          </td>
          <td>
            <a href='http://localhost/iksce/user/1' property='http://rdfs.org/sioc/ns#has_creator'>http://localhost/iksce/user/1</a>
          </td>
        </tr>
        <tr class='property'>
          <td class='label'>
            http://rdfs.org/sioc/ns#num_replies
          </td>
          <td datatype='http://www.w3.org/2001/XMLSchema#integer' property='http://rdfs.org/sioc/ns#num_replies'>0</td>
        </tr>
      </table>
    </td>

  </body>
</html>

Gregg Kellogg
gregg@greggkellogg.net

[1] http://rdf.greggkellogg.net/distiller

> On Jan 24, 2016, at 11:27 AM, Brent Shambaugh <brent.shambaugh@gmail.com> wrote:
> 
> Dear all,
> 
> I was talking about this on #swig IRC with the username BigBear (thanks everyone) and I thought it was better to ask on the list. I'm looking back at the December 2012 IKScE for Drupal demo, and I wanted the annotations to be in RDFa so I can pull them into the ARC2 store as triples, instead of being embedded as a content block in <content:encoded> tags.
> http://wolfgangziegler.net/semantic-content-enhancements-drupal-apache-stanbol-viejs <http://wolfgangziegler.net/semantic-content-enhancements-drupal-apache-stanbol-viejs>
> Looking at an rdf representation produces something like this (for me it is http://localhost/iksce/node/10.rdf <http://localhost/iksce/node/10.rdf> from http://localhost/iksce/node/10 <http://localhost/iksce/node/10>):: 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns# <>"
>   xmlns:content="http://purl.org/rss/1.0/modules/content/ <>"
>   xmlns:dc="http://purl.org/dc/terms/ <>"
>   xmlns:sioc="http://rdfs.org/sioc/ns# <>">
> 
>   <rdf:Description rdf:about="http://localhost/iksce/node/10 <>">
>     <rdf:type rdf:resource="http://rdfs.org/sioc/ns#Item <>"/>
>     <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Document <>"/>
>     <content:encoded>&lt;p&gt;Salzburg Research Forschungsgesellschaft mbH ist a non-academic research institute in &lt;a aria-disabled=&quot;false&quot; href=&quot;http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>&quot; resource=&quot;http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>&quot; rel=&quot;related&quot; class=&quot;entity place Place acknowledged&quot;&gt;Austria&lt;/a&gt;. The research technology organisation specializes in applied research and development in the field of information and communication technologies (ICT) and New Media.&lt;/p&gt;
> </content:encoded>
>     <dc:title>Salzburg Research Forschungsgesellschaft mbH</dc:title>
>     <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime <>">2012-12-05T19:37:15-05:00</dc:date>
>     <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime <>">2012-12-05T19:37:15-05:00</dc:created>
>     <dc:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime <>">2016-01-22T22:14:40-05:00</dc:modified>
>     <sioc:has_creator rdf:resource="http://localhost/iksce/user/1 <>"/>
>     <sioc:num_replies rdf:datatype="http://www.w3.org/2001/XMLSchema#integer <>">0</sioc:num_replies>
>   </rdf:Description>
> 
> </rdf:RDF>
> I hacked together some RDFa to try to accomplish this. (So I know what to expect of Drupal later)
> 
> <!DOCTYPE html>
> <html lang="en">
>   <head>
>     <title>Example Document</title>
>   </head>
>   <body>
> <div class="field-item-even" property="content:encoded">
> <p>Salzburg Research Forschungsgesellschaft mbH ist a non-academic research institute in <span vocab="http://schema.org/ <http://schema.org/>"><a property="schema:Comment" aria-disabled="false" href="http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>" resource="http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>" rel="sameAs" class="entity place Place acknowledged">Austria</a></span>. The research technology organisation specializes in applied research and development in the field of information and communication technologies (ICT) and New Media.</p>
> </div>
> </body>
> </html>
> 
> which becomes rdf/xml with http://rdf-translator.appspot.com/ <http://rdf-translator.appspot.com/> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <rdf:RDF
>    xmlns:content="http://purl.org/rss/1.0/modules/content/ <>"   
>    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns# <http://www.w3.org/1999/02/22-rdf-syntax-ns#>"
>    xmlns:rdfa="http://www.w3.org/ns/rdfa# <http://www.w3.org/ns/rdfa#>"
>    xmlns:schema="http://schema.org/ <http://schema.org/>"
> >
>   <rdf:Description rdf:about="http://localhost/iksce/node/10 <http://localhost/iksce/node/10>">
>     <rdfa:usesVocabulary rdf:resource="http://schema.org/ <http://schema.org/>"/>
>     <schema:sameAs rdf:resource="http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>"/>
>     <content:encoded>
> Salzburg Research Forschungsgesellschaft mbH ist a non-academic research institute in Austria. The research technology organisation specializes in applied research and development in the field of information and communication technologies (ICT) and New Media.
> </content:encoded>
>     <schema:Comment>Austria</schema:Comment>
>   </rdf:Description>
> </rdf:RDF>
> 
> I want "Austria" sameAs "http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>" or something that has that meaning instead of <http://localhost/iksce/node/10 <http://localhost/iksce/node/10>> <schema:sameAs> <http://localhost/iksce/?q=node/15 <http://localhost/iksce/?q=node/15>> and <http://localhost/iksce/node/10 <http://localhost/iksce/node/10>> schema:Comment "Austria" .  I put my modification into https://www.w3.org/RDF/Validator/ <https://www.w3.org/RDF/Validator/> to see this discrepancy.
> 
> By the way, great job fago and scor. I could not have done this much with Drupal without you.
> 
> -Brent Shambaugh
> 
> 

Received on Sunday, 24 January 2016 19:47:38 UTC