; LEDP2011
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

LEDP2011

VIEWS: 0 PAGES: 10

  • pg 1
									         Extending	the
         Linked Data API	with	RDFa*	
                                        *RDF in Attributes
                                             Steve BattleSysemia.co.uk
                           James Leigh, David Wood   3roundstones.com




                                                                         1

Tuesday, 6 December 2011
         The Linked Data API
             The LDA is an easy to use and easy        Jeni Tennison,
             to deploy API layer that can act as a     Dave reynolds,
                                                       Leigh Dodds et al
             proxy for any SPARQL endpoint.
             code.google.com/p/linked-data-api/

             ELDA: An implementation of the LDA
             using Jena.
             www.epimorphics.com/web/tools/elda.html

             Callimachus allows Web authors to
             rapidly create semantically-enabled
             Web applications with RDFa.
             www.callimachusproject.org


                                                                           2

Tuesday, 6 December 2011
       RDF in Attributes
                            <div about="http://education.data.gov.uk/id/school/100869"
                              typeof="school:School">
                            <h2 property="rdfs:label">Southwark Small School</h2>




                           <div rel="school:typeOfEstablishment"
                             resource="http://education.data.gov.uk/def/school/
                           TypeOfEstablishment_TERM_Other_Independent_School">
                             Type of Establishment
                             <span property="rdfs:label">Other Independent School</span>
                           </div>




                                                                                           3

Tuesday, 6 December 2011
         Alternatives to RDFa
     •     Microformats add no new vocabulary, overloading the
           existing HTML class. Uses Plain Old Semantic HTML (POSH).
           ★ not user extensible.

     •     Microdata adds custom name/value itemprop pairs.
           ★ Mixed namespaces very verbose
             (itemtype defines current namespace).
           ★ No ‘hidden’ content.
           ★ No datatypes.
           ★ Good support for Lists.

     •     RDFa Lite now sanctioned by schema.org
           ★ just 5 attributes; vocab, typeof, property, about, and prefix.
                                                                             4

Tuesday, 6 December 2011
         Motivation: Enterprise SEO
         • Search Engine Optimization
             Google Rich Snippets “Creating Google Friendly Sites”




                                             Rich snippets derived from
                                                  RDFa metadata



             “The RDFa/SEO Wave: How to Catch it and Why”
             “How Retailers Can Improve Product Visibility Using Structured Markup”



                                                                                      5

Tuesday, 6 December 2011
      Motivation: Enterprise Facebook = Facebook
         • Facebook Open Graph Protocol
             The Open Graph Protocol enables you to integrate your
             Web pages into the social graph.




                                          summary data derived from
                                              RDFa meta tags

          • Open Graph Beta
               Includes arbitrary actions and objects
               created by 3rd parties
                                                                      6

Tuesday, 6 December 2011
      Pattern: RDFa as Web-Template Language
              loops: elements are              The scope of a variable
           repeated for every known            binding is the element it
                    binding.                         appears in.

          <?xml version="1.0" encoding="UTF-8" ?>                            Variables are
          <html xmlns="http://www.w3.org/1999/xhtml"
                                                                           placeholders for
           xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
           xmlns:school="http://education.data.gov.uk/def/school/">           resources.
           <head><title>Schools</title></head>
           <body>
            <div about="?school" typeof="school:School">
             <h2 property="rdfs:label" />
             <div rel="school:typeOfEstablishment" resource=”?type”>
              Type of Establishment <span property="rdfs:label" />
             </div>
            </div> ...
           </body>
          </html>
                                                        Instantiated properties
                                                     define mandatory conditions.
                   substitution: empty
             content or @content is replaced
                  by matching values.


                                                                                              7

Tuesday, 6 December 2011
      Implementation:              Processing Model
                                                            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
                                                            PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
                              Selector                      PREFIX school:<http://education.data.gov.uk/def/school/>

   Request*                     select,
                                                            SELECT REDUCED *
                                                            WHERE {
                             paginate, sort                  {
                                                               { SELECT ?school WHERE {
                                                                    ?school rdf:type school:School .
                                                               } OFFSET 0 LIMIT 10 }

                               Viewer                          OPTIONAL {
                                                                {
                               compile to                         ?school rdfs:label ?_label .
                                SPARQL                          }
                                                                UNION
                                                                {
                                                                  ?school
                                                                  school:typeOfEstablishment ?type.

       Response             Formatter                             OPTIONAL {
                                                                    ?type rdfs:label ?_type_label .
                           results to XHTML
                                                                  }
                                                            }}}}



 * http://localhost:8080/elda/api/education/schools.html?_format=rdfa&_view=schoolRDFa&_page=0                      8

Tuesday, 6 December 2011
         Benefits
           • Allows automation of RDFa metadata.
           • Web authors don’t need to learn XSLT.
           • Web authors don’t need to learn SPARQL.
           • LDA Brings pagination to RDFa templating.



                                                         9

Tuesday, 6 December 2011
                           Questions?




                                        10

Tuesday, 6 December 2011

								
To top