W3C home > Mailing lists > Public > public-openannotation@w3.org > March 2013

Re: Best Practices - Semantic Tagging

From: Robert Sanderson <azaroth42@gmail.com>
Date: Mon, 4 Mar 2013 09:46:40 -0700
Message-ID: <CABevsUFLkjG8X0T7unt7Dy91jy1yp2TzTHm2ihhsRBBFSgxJQQ@mail.gmail.com>
To: "Timothy W. Cook" <timothywayne.cook@gmail.com>
Cc: public-openannotation <public-openannotation@w3.org>
Dear all,

I think there are two main questions to be considered here:

1.  Can, and if so should, Open Annotations be used inline within XML
that isn't itself RDF?
2.  How do you annotate XML data, in this case XML schema?

My opinion on 1 is that even if it is possible, it probably shouldn't
be done as processors won't understand what is going on.  The proposed
xs:annotation pattern looks preferable in this case, but isn't in our
scope.

And for 2, the most appropriate way seems to be a FragmentSelector
with an XPath that takes you to the element to be annotated.

eg, assuming the schema was http://example.org/ns/schema.xml:

_:anno1 a oa:Annotation,
  oa:hasBody _:body1 ;
  oa:hasTarget _:specific1 .

_:body1 a cnt:ContentAsText ;
  dc:format "text/xml" ;
  cnt:chars "<xs:appinfo><rdfs:isDefinedBy
rdfs:resource="http://purl.bioontology.org/ontology/SNOMEDCT/365761000"/></xs:appinfo>"
.

_:specific1 a oa:SpecificResource ;
  oa:hasSource <http://example.org/ns/schema.xml> ;
  oa:hasSelector _:frag1 .

_:frag1 a oa:FragmentSelector ;
  rdf:value "//xs:complexType[@name='ct-f6c5ea6e-6458-4799-874d-7f3d365d260d']"
 .


Does that make sense?

Rob


On Sat, Mar 2, 2013 at 7:23 AM, Timothy W. Cook
<timothywayne.cook@gmail.com> wrote:
> HI All,
>
> Though I have read virtually everything I can find related to this
> subject; including:
> http://lists.w3.org/Archives/Public/public-openannotation/2013Feb/0051.html
>
> I really don't see the answer to my question.
>
> First of all this is a "green field" area.  I do not have to be
> concerned with existing documents and how it has been done in the
> past.
>
> I just want to get this right, the first time. Given all the
> experience from people here.
>
> Scenario:
>
> I have XML Schemas that define data instance structures (as usual).
> These schemas use a lot of complexTypes that are restrictions from a
> base schema.  Since each base schema complexType can be represented in
> a schema multiple times with different restrictions, I use a UUID
> based name. For example:
>
>   <xs:complexType name="ct-f6c5ea6e-6458-4799-874d-7f3d365d260d">
>         <xs:complexContent>
>             <xs:restriction base="mlhim2:DvQuantityType">
>                 <xs:sequence>
>
> ...
>
> These complexTypes are almost always definable via a controlled
> vocabulary, ex. SNOMED-CT
>
> In order to add semantics to the complexType definition my current
> thought is to use:
>
>   <xs:complexType name="ct-f6c5ea6e-6458-4799-874d-7f3d365d260d">
>     <xs:annotation>
>       <xs:appinfo>
>         <rdfs:isDefinedBy
> rdfs:resource="http://purl.bioontology.org/ontology/SNOMEDCT/365761000"/>
>       </xs:appinfo>
>     </xs:annotation>
>         <xs:complexContent>
>             <xs:restriction base="mlhim2:DvQuantityType">
>                 <xs:sequence>
> ...
>
> Which will identify this complexType as a Sodium level finding
> according to SNOMED-CT.
>
> My first question is:
> 1) is it correct to make the assumption that the annotation applies to
> the enclosing complexType without using an rdf:about (or similar)
> definition?
>
> 2) is rdfs:isDefinedBy the "tag" to use, or is something like
> oa:SemanticTag a better choice?
>
> Realizing that these annotations will not be reproduced in the
> instance data.  The eco-system around this says that to determine the
> full semantics you must have the schema associated with any instance
> data.
>
> Thoughts?
>
> Cheers,
> Tim
>
>
>
> --
> ============================================
> Timothy Cook, MSc           +55 21 94711995
> MLHIM http://www.mlhim.org
> Like Us on FB: https://www.facebook.com/mlhim2
> Circle us on G+: http://goo.gl/44EV5
> Google Scholar: http://goo.gl/MMZ1o
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>
Received on Monday, 4 March 2013 16:47:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 4 March 2013 16:47:14 GMT