W3C home > Mailing lists > Public > public-owl-dev@w3.org > April to June 2009

OWL2 questions

From: Thomas Loertsch <loertsch.thomas@guj.de>
Date: Tue, 05 May 2009 15:21:48 +0200
To: <public-owl-dev@w3.org>
Message-ID: <C6260A0C.1153%loertsch.thomas@guj.de>
hello list,

i'm working on a mapping of microformats to rdf. i'm trying to capture all
the properties of every element of every microformat as well as the
restrictions on element values. the task is bigger than i had thought
(hoped) and especially the modelling of the value constraints is rather
tricky. i have no local OWL guru whom i could pester with detailed questions
so i'm turning to you, list.
the full draft of the mapping can be found at http://purl.org/amicroformat
(a N3 version ready for human consumption as well as a machine generated
rdf/xml version) but that's a long read. i would be very grateful if someone
could comment on the following constructs. are they correct? do they express
what the rdfs:comments suggest? did i get the use of unionOf and
intersectionOf right? or should i have used oneOf? and what about the blank
nodes - do they "sit" right?

the method element for example i still quite simple. the original
microformat says "The field MAY include valid HTML markup e.g. paragraphs or
a list for steps in the method." so both xsd:strings and html are correct.
that's why i used unionOf

  a  owl:DatatypeProperty ;
  rdfs:label  "method" ;
  rdfs:isDefinedBy <http://microformats.org/wiki/hrecipe#method> ;
  rdfs:domain :Recipe ;
    [ a owl:Restriction ;
      [ owl:unionOf
         ( xsd:string
           <http://www.w3.org/TR/html/> )
        ] ;
      rdfs:comment "The field MAY include valid HTML markup e.g. paragraphs
or a list for steps in the method."
                       ] ;
    "The method of the recipe."

the second example is harder to model: the hcard-conventions have to be
followed and certain html-elements are optional. i used a combination of
intersectionOf and unionOf (i wouldn't know how to model the difference
between "SHOULD" and "MAY" though).

  a owl:ObjectProperty;
  rdfs:label "photo" ;
  rdfs:isDefinedBy <http://microformats.org/wiki/hcard> ;
  rdfs:seeAlso <http://microformats.org/wiki/hrecipe#photo> ;
  rdfs:domain :Card ,
    [ a owl:Restriction ;
      [ owl:intersectionOf
        [ owl:unionOf
          ( xsd:string
          ) ,
        ] ;
         "Typically used with an <img> tag. Use the 'src' attribute for URI
values. Use the 'data:' URI scheme for binary values.
<http://www.ietf.org/rfc/rfc2426.txt>" ,
         "The element SHOULD use an <img> element. The element MAY use any
other element that contains a URL, such as <a> or <object>, but it is not
recommended.  The contents of the element MUST follow the conventions
outlined in <a href='http://microformats.org/wiki/hCard'>hCard</a>."
    ] ;
    "See section 3.1.4 of RFC 2426. <http://www.ietf.org/rfc/rfc2426.txt>" ,
    "Accompanying image. "

any comments greatly appreciated!

Thomas Lörtsch
Business Development
G+J Exclusive&Living digital GmbH
Redaktion Online
Stubbenhuk 5
20459 Hamburg
eMail: loertsch.thomas@guj.de
Received on Tuesday, 5 May 2009 13:22:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:18 UTC