RE: Amico Corpus

> -----Original Message-----
> From: Kevin Smathers [mailto:kevin.smathers@hp.com]
> Sent: 02 September 2003 19:17

> In the example you've shown the 'credit' tag appears to 
> suffer the same 
> problem, and 'place' likewise unless the location in question is the 
> location not of the object, but of the museum.   

Yes, good point. You might have different credits for the same organization,
and an organization might have multiple locations. So I guess the question
is do we want to record the provenance of an image, e.g. store multiple
organizations. If so then we create a sub-object from the item, that
contains organisation, location, credit and accession. If not, we can just
make location, credit and accession properties of the item. 

but as you point out that's not necessarily true. So its better to do 

> Personally I 
> prefer the 
> first form except for the 'Owner' versus 'owner' distinction which is 
> lost to me.  Indeed, why not:
> 
> <Paintings rdf:about = "WMAA.70.1650">
>   <Title>(Self-Portrait)</Title>
>   <owner>
>     <Organization rdf:about =
> "http://www.amico.org/laf/entities/whitney_museum_of_american_art">
>       <name>Whitney Museum of American Art</name>
>     </Organization>
>     <accessionNumber rdf:resource = "70.1650" />
>     <place>New York, New York, USA</place>
>     <credit>Josephine N. Hopper Bequest</credit>
>   </owner>
> </Paintings>

Because that's not legal RDF. It breaks the striped syntax of RDF/XML,
because you've got

Class
	Property
	Property
		Class
			Property
		Property
		Property
		Property

you can't have property property, it has to be class property class property
etc ...

Yes the owner / Owner distinction is horrible and ugly, but unfortuately
it's necessary due to the current RDF/XML syntax. The only way to overcome
it is to use rdf:parseType="Resource" e.g. 

<Paintings rdf:about = "WMAA.70.1650">
  <Title>(Self-Portrait)</Title>
  <owner rdf:parseType="Resource">
    <organization>
	<rdf:Description rdf:about
="http://www.amico.org/laf/entities/whitney_museum_of_american_art">
      	<name>Whitney Museum of American Art</name>
	</rdf:Description>
    </organization>
    <accessionNumber rdf:resource = "70.1650" />
    <place>New York, New York, USA</place>
    <credit>Josephine N. Hopper Bequest</credit>
  </owner>
</Paintings>

(An aside: personally, I think this is further proof of how confusing the
striped syntax is, and I note that in XML people would naturally encode the
above as follows:

<painting ID = "WMAA.70.1650">
  <title>(Self-Portrait)</title>
  <owner>
    <organization ID
="http://www.amico.org/laf/entities/whitney_museum_of_american_art">
    	<name>Whitney Museum of American Art</name>
    </organization>
    <accessionNumber ID = "70.1650" />
    <place>New York, New York, USA</place>
    <credit>Josephine N. Hopper Bequest</credit>
  </owner>
</painting>

If the serialisation above was valid RDF/XML, I think people would have less
difficulty writing RDF/XML. A number of people have made proposals along
these lines, I enclose I did a while back for anyone who is interested.)

kind regards

Dr Mark H. Butler
Research Scientist                HP Labs Bristol
mark-h_butler@hp.com
Internet: http://www-uk.hpl.hp.com/people/marbut/

Forwarded message 1

  • From: Butler, Mark <Mark_Butler@hplb.hpl.hp.com>
  • Date: Fri, 28 Feb 2003 12:19:37 +0100
  • Subject: Simplifed RDF/XML syntax
  • To: 'Eric Miller' <em@w3.org>
  • Message-ID: <5E13A1874524D411A876006008CD059F04501EA0@0-mail-1.hpl.hp.com>
Hi Eric,

Look forward to seeing you sometime next week. After our discussion last
week, I've been working on a proposal on a simplified RDF/XML syntax, and
I'd be interested in feedback on it:


Simplifed RDF (sRDF)

Here is a (hardly novel) proposal for a simplified syntax for RDF/XML that
avoids these problems and is much more ammenable for processing via XML
tools, effectively bootstrapping RDF by allowing it to be processed by
existing XML tools. Of course, if you use lots of subgraphs rather
than something that looks like a tree then it will no longer be
processable by XML tools, but that's not the point. The point is to have a
simple way of writing a document that is XML, that can be processed as XML, 
but can be treated as RDF is so required so is compatible with the other
tools in the SW stack. 

Simplified RDF is a proposal for a simplified version of RDF 
which unlike the current RDF/XML is fully compatible with existing 
XML tools. It has much in common with other proposals e.g.

http://www-db.stanford.edu/~melnik/rdf/syntax.html
http://www.langdale.com.au/CIMXML/PSModelExchange.pdf
http://www.w3.org/DesignIssues/Syntax.html

in that it is not striped and it is designed to allow information to be 
extracted using XPath, a crucial requirement for better compatibility
with XML. 

Simplified RDF is based on a couple of design principles:

1. RDF is a graph.

2. XML is a tree.

3. Don't use attributes and elements interchangeably, as then
it is harder to use existing tools. This makes it harder to
embed RDF in HTML, but this is not a requirement of many use cases
for RDF e.g. CC/PP. 

4. Hence here we just use elements, except for resources which are 
indicated by attributes.

5. To turn a tree into a graph we just need equivalence, which
we denote using rdf:resource by having two nodes with the same
identifier. 

6. We may wish to describe multiple graphs in an RDF document.

Therefore sRDF defines uses three rules:

<srdf:graph></srdf:graph> - creates a new graph

all other elements are properties

using the attribute srdf:resource in the graph element names
the graph root node

using the attribute srdf:resource in any other element names
the object node

Literal nodes can't contain srdf:resource attributes, but
they can use srdf:datatype and xml:lang attributes just as in
the current version of RDF.
 
sRDF has a number of advantages:
1. It does not use a striped syntax. 
2. It is much more similar to the way 70 - 80% of people use XML. 
3. Therefore it is much simpler than RDF/XML.
4. Due to the reduced number of alternatives it is much faster to parse.
5. As a result of all of these properties it is much easier to understand.

It's main disadvantage is it doesn't use typedNodes, so you have to
specify entire URIs for typing. However, nodes can have multiple types, 
and containers are typed in the same way as other nodes. 

Banning typedNodes is a bit ugly, but can be overcome by using DTD entity 
definitions (See the striped example). I understand people
would prefer to get rid of entity definitions, but they have great
utility when specifying URIs in attribute or element values. I can
understand why people want to get rid of DTDs, but losing a short
hand way of expressing URIs in these situations is a high price to pay!

Here are some examples of simplified RDF, taken from the RDF primer
http://www.w3.org/TR/rdf-primer/

Example 1:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
  <contact:Person rdf:about="http://www.w3.org/People/EM/contact#me">
    <contact:fullName>Eric Miller</contact:fullName>
    <contact:mailbox rdf:resource="mailto:em@w3.org"/>
    <contact:personalTitle>Dr.</contact:personalTitle> 
  </contact:Person>
</rdf:RDF>

becomes

<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
             xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
<srdf:graph srdf:resource="http://www.w3.org/People/EM/contact#me">
  <srdf:type>http://www.w3.org/2000/10/swap/pim/contact#Person</srdf:type>
  <contact:fullName>Eric Miller</contact:fullName>
  <contact:mailbox srdf:resource="mailto:em@w3.org"/>
  <contact:personalTitle>Dr.</contact:personalTitle> 
</srdf:graph>
</srdf:SRDF>


Example 2:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:exterms="http://www.example.org/terms/">
<rdf:Description rdf:about="http://www.example.org/index.html">
	<exterms:creation-date>August 16, 1999</exterms:creation-date>
</rdf:Description>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
 xmlns:exterms="http://www.example.org/terms/">
<srdf:graph srdf:resource="http://www.example.org/index.html">
	<exterms:creation-date>August 16, 1999</exterms:creation-date>
</srdf:graph>
</srdf:SRDF>


Example 3:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:exterms="http://www.example.org/terms/">
<rdf:Description rdf:about="http://www.example.org/index.html">
      <exterms:creation-date>August 16, 1999</exterms:creation-date>
 </rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
       <exterms:language>English</exterms:language>
</rdf:Description>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
    xmlns:exterms="http://www.example.org/terms/">
<srdf:graph srdf:resource="http://www.example.org/index.html">
      	<exterms:creation-date>August 16, 1999</exterms:creation-date>
</srdf:graph>
<srdf:graph srdf:resource="http://www.example.org/index.html">
        <exterms:language>English</exterms:language>
</srdf:graph>
</srdf:SRDF>


Example 4:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:exterms="http://www.example.org/terms/">
   <rdf:Description rdf:about="http://www.example.org/index.html">
         <exterms:creation-date>August 16, 1999</exterms:creation-date>
         <exterms:language>English</exterms:language>
         <dc:creator rdf:resource="http://www.example.org/staffid/85740"/>
    </rdf:Description>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:exterms="http://www.example.org/terms/">
<srdf:graph srdf:resource="http://www.example.org/index.html">
         <exterms:creation-date>August 16, 1999</exterms:creation-date>
         <exterms:language>English</exterms:language>
         <dc:creator srdf:resource="http://www.example.org/staffid/85740"/>
</srdf:graph>
</srdf:SRDF>


Example 5:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:exterms="http://www.example.org/terms/">
<rdf:Description rdf:about="http://www.example.org/index.html">
    <exterms:creation-date>August 16, 1999</exterms:creation-date>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
     <exterms:language>English</exterms:language>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
     <dc:creator rdf:resource="http://www.example.org/staffid/85740"/>
</rdf:Description>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:exterms="http://www.example.org/terms/">
<srdf:graph srdf:resource="http://www.example.org/index.html">
    	<exterms:creation-date>August 16, 1999</exterms:creation-date>
</srdf:graph>
<srdf:graph srdf:resource="http://www.example.org/index.html">
     	<exterms:language>English</exterms:language>
</srdf:graph>
<srdf:graph srdf:resource="http://www.example.org/index.html">
        <dc:creator srdf:resource="http://www.example.org/staffid/85740"/>
</srdf:graph>
</srdf:RDF>


Example 6:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:exterms="http://example.org/stuff/1.0/">
<rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar">
<dc:title>RDF/XML Syntax Specification (Revised)</dc:title>
 <exterms:editor rdf:nodeID="abc"/>
</rdf:Description>
<rdf:Description rdf:nodeID="abc">
 <exterms:fullName>Dave Beckett</exterms:fullName>
 <exterms:homePage rdf:resource="http://purl.org/net/dajobe/"/>
</rdf:Description>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:exterms="http://example.org/stuff/1.0/">
<srdf:graph srdf:resource="http://www.w3.org/TR/rdf-syntax-grammar">
	<dc:title>RDF/XML Syntax Specification (Revised)</dc:title>
	<exterms:editor srdf:resource="abc"/>
</srdf:graph>
<srdf:graph srdf:resource="abc">
	<exterms:fullName>Dave Beckett</exterms:fullName>
	<exterms:homePage srdf:resource="http://purl.org/net/dajobe/"/>
</srdf:graph>
</srdf:SRDF>

Example 7:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:exterms="http://www.example.org/terms/">
   <rdf:Description rdf:about="http://www.example.org/index.html">
     <exterms:creation-date rdf:datatype=
         "http://www.w3.org/2001/XMLSchema#date">1999-08-16
       </exterms:creation-date>
   </rdf:Description>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
             xmlns:exterms="http://www.example.org/terms/">
   <srdf:graph srdf:resource="http://www.example.org/index.html">
     <exterms:creation-date srdf:datatype=
         "http://www.w3.org/2001/XMLSchema#date">1999-08-16
       </exterms:creation-date>
   </srdf:graph>
</srdf:SRDF>

Example 13:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:s="http://example.edu/students/vocab#">
   <rdf:Description rdf:about="http://example.edu/courses/6.001">
      <s:students>
         <rdf:Bag>
            <rdf:li rdf:resource="http://example.edu/students/Amy"/>
            <rdf:li rdf:resource="http://example.edu/students/Tim"/>
            <rdf:li rdf:resource="http://example.edu/students/John"/>
            <rdf:li rdf:resource="http://example.edu/students/Mary"/>
            <rdf:li rdf:resource="http://example.edu/students/Sue"/>
         </rdf:Bag>
      </s:students>
   </rdf:Description>
</rdf:RDF>

becomes:

<?xml version="1.0"?>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
         xmlns:s="http://example.edu/students/vocab#">
   <srdf:graph srdf:resource="http://example.edu/courses/6.001">
      	<s:students> 
<srdf:type>http://www.w3.org/2003/02/24-srdf-syntax-ns#Bag</srdf:type>
            <srdf:li srdf:resource="http://example.edu/students/Amy"/>
            <srdf:li srdf:resource="http://example.edu/students/Tim"/>
            <srdf:li srdf:resource="http://example.edu/students/John"/>
            <srdf:li srdf:resource="http://example.edu/students/Mary"/>
            <srdf:li srdf:resource="http://example.edu/students/Sue"/>
      </s:students>
   </srdf:graph>
</srdf:SRDF>

An example with more sophisticated striping, taken from
http://www.w3.org/2001/10/stripes/

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/rdf-syntax-ns#"
     dlg:xmlns="http://example.com/some-dlg-schema#"> 
<dlg:Person>
   <dlg:name>John</dlg:name>
   <dlg:livesWith>  
      <dlg:Person>
         <dlg:father>
            <dlg:Person>
               <dlg:name>Fred</dlg:name>
            </dlg:Person>
         </dlg:father>
      </dlg:Person>
   </dlg:livesWith>
</dlg:Person>
</rdf:RDF>

becomes

<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
 <!ENTITY ns-dlg  'http://example.com/some-dlg-schema#'>
]>
<srdf:SRDF xmlns:srdf="http://www.w3.org/2003/02/24-srdf-syntax-ns#"
     dlg:xmlns="&ns-dlg;"> 
<srdf:graph>
  <rdf:type srdf:resource="&ns-dlg;Person"/>
   <dlg:name>John</dlg:name>
   <dlg:livesWith>
      <rdf:type srdf:resource="&ns-dlg;Person"/>  
         <dlg:father>
	    <rdf:type srdf:resource="&ns-dlg;Person"/>
               <dlg:name>Fred</dlg:name>
         </dlg:father>
   </dlg:livesWith>
</srdf:graph>
</srdf:SRDF>

Mark H. Butler, PhD
Research Scientist                HP Labs Bristol
mark-h_butler@hp.com
Internet: http://www-uk.hpl.hp.com/people/marbut/

Received on Wednesday, 3 September 2003 06:19:35 UTC