Re: [ISSUE-2] Re: Strawman microdata proposal

The syntax of Maxime's example somehow got destroyed in the archive
http://lists.w3.org/Archives/Public/public-multilingualweb-lt/2012Mar/0011.html
so re-sending here for readability purposes.

Felix



---------- Weitergeleitete Nachricht ----------

Von: Maxime Lefrançois <maxime.lefrancois@inria.fr>

Datum: 20. März 2012 17:19

Betreff: Re: [ISSUE-2] Re: Strawman microdata proposal

An: public-multilingualweb-lt@w3.org

Cc: Fabien Gandon <fabien.gandon@inria.fr>





I'm an newcomer here and I only discover ITS. I believe that:

 - porting the ITS to the Semantic Web formalisms would be the best
practise to represent hierarchical concepts and thus to enable simple
reasoning (if we wish to do so),

 - using RDFa in HTML5 would leverage the interoperability between
existing/futur w3c standards (correct validation, easy data consumability
by browser extensions, enhanced search engine results goo.gl/aCb2P

, etc.)

 - of course, RDFa makes documents much more verbose than simple xml
attributes...





Let's consider the simple ITS annotated example:



<body xmlns:its="http://www.w3.org/2005/11/its">

            <span its:translate="no" its:term="yes"
its:locNote="foo">bar</span>

</body>



The rewriting of this example would depend on the model choosen for ITS 2.0.

In the following, I illustrate this with two different models of ITS. For
each model, two syntaxes: one using RDFa 1.1 and one using Microdata that
produce output "bar", and equivalent annotations are given.



Example of model 1:

 its:translate is a a literal of datatype  xsd:boolean  and what is
described is an instance of the  its:Term  class / is of type its:Term



RDFa 1.1 syntax:

<body prefix="xsd: http://www.w3.org/2001/XMLSchema# its:
http://www.w3.org/20XX/XX/its#">

            <span typeof="its:Term" property="its:value">

             <meta property="its:translate" content="false"
datatype="xsd:boolean"  />

             <meta property="its:locNote" content="foo" >bar</span>

</body>



--> This will produce the following triples, expressed in Turtle syntax:

@prefix its: <http://www.w3.org/20XX/XX/its#> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<> rdf:type its:Term ;

            its:translate "false"^^xsd:boolean ;

            its:locNote "foo" ;

            its:value "bar" .



Microdata syntax:

<body>

            <span itemscope itemtype="http://www.w3.org/2005/11/its#Term">

                       <meta itemprop="
http://www.w3.org/2005/11/its#translate" content="false"/>

                       <meta itemprop="http://www.w3.org/2005/11/its#locNote"
content="foo"/>

                       <span itemprop="http://www.w3.org/2005/11/its#value
">bar</span>

            </span>

</body>



--> This will produce the following JSON:

{ "items": [ {

      "type": [ "http://www.w3.org/2005/11/its#Term" ],

      "properties": {

        "http://www.w3.org/2005/11/its#translate": [ "false" ],

        "http://www.w3.org/2005/11/its#locNote": [ "foo" ],

        "http://www.w3.org/2005/11/its#value": [ "bar" ]

      }

  } ]

}





Example of model 2:

 what is described is an instance of the  its:Term and the its:NoTranslate
classes (as these are unary relations, using classes may be the best
modelization choice) -> this leads to a shorten syntax.



RDFa 1.1 syntax:

<body prefix="         xsd: http://www.w3.org/2001/XMLSchema#

                                               its:
http://www.w3.org/20XX/XX/its#">

            <p typeof="its:Term its:NoTranslate" property="its:value">

             <meta property="its:locNote" content="foo" />

            bar

            </p>

</body>



--> This will produce the following triples, expressed in Turtle syntax:

@prefix its: <http://www.w3.org/20XX/XX/its#> .

<> rdf:type its:Term ;

            rdf:type its:NoTranslate ;

            its:locNote "foo" ;

            its:value "bar" .



Microdat:

<body>

            <span itemscope itemtype="http://www.w3.org/2005/11/its#Term
http://www.w3.org/2005/11/its#NoTranslate">

                       <meta itemprop="http://www.w3.org/2005/11/its#locNote"
content="foo"/>

                       <span itemprop="http://www.w3.org/2005/11/its#value
">bar</span>

            </span>

</body>



--> This will produce the following JSON:

{ "items": [ {

      "type": [ "http://www.w3.org/2005/11/its#Term" "
http://www.w3.org/2005/11/its#NoTranslate" ],

      "properties": {

        "http://www.w3.org/2005/11/its#locNote": [ "foo" ],

        "http://www.w3.org/2005/11/its#value": [ "bar" ]

      }

  } ]

}







Maxime Lefrançois

Ph.D. Student, INRIA - WIMMICS Team

http://maxime-lefrancois.info

@Max_Lefrancois

Received on Wednesday, 21 March 2012 09:19:59 UTC