OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Semantic Web permathread, iteration n+1 (was Re: [xml-dev]

[ Lists Home | Date Index | Thread Index ]
  • To: "Robert Koberg" <rob@koberg.com>
  • Subject: RE: [xml-dev] Semantic Web permathread, iteration n+1 (was Re: [xml-dev] InfoWorld agrees with Elliote Rusty Harold)
  • From: "Joshua Allen" <joshuaa@microsoft.com>
  • Date: Fri, 4 Jun 2004 14:48:22 -0700
  • Cc: "XML Developers List" <xml-dev@lists.xml.org>
  • Thread-index: AcRKVsjLnXoiHYXfS6+d2Dc2wo/szwAI1xbQ
  • Thread-topic: [xml-dev] Semantic Web permathread, iteration n+1 (was Re: [xml-dev] InfoWorld agrees with Elliote Rusty Harold)

OK, I'll give some more detailed example.  One of the things that
Chandler, WinFS, and many other systems store is a "Person" item.  The
Person can be used as a contact in an address book, as an entry in the
IM client, and so on.  Another possible thing would be a "Picture" item,
which represents a media file. 

So the basic data model is this -- you have "items", "properties", and
"item" - a thing like "Person" or "Picture", about which you can make
statements.  The same as RDF "subject".
"property" - a named aspect of an item, such as "PhoneNumber" or
"PictureDate".  The same as RDF "predicate".
"value" - the value you are asserting for the property, can be a literal
or even another "item".  The same as RDF "object".

One name that programmers use for this data model is "property bag".
Basically you can assign property values by name, and stick whatever you
want on the property bag.  For example:

Person p = new Person();
p["PhoneNumber"] = "+1-425-882-8080";
p["someRandomPropertyIMadeUp"] = "fooBar";
p["Depiction"] = new Picture("foo.jpg");

This is a really common pattern for systems which have a lot of
variability in schema.  For example, this is how MS Exchange and Lotus
notes have modeled messages for at least a decade.  You can stick new
properties on a message without problems.  This is essentially the model
of LDAP and ADSI as well, since objects in a directory could have all
sorts of important properties that vary by organization.  This is also a
natural way to model a media file, since you have things like "album",
"composer", "length", "dimensions" -- metadata which may not always be
available, or availability which may change in the future, or metadata
which may be sourced from multiple locations (imdb, musicbrainz, etc).

SO, the question is, are these scenarios best suited to XML?  Obviously
there have been XML formats developed for interchange of these formats
(like DSML for directories, iCard for contact info, etc.)

The XML you demonstrated is not bad.  Basically you are saying that
elements always maps to items, attributes always map to predicates, and
attribute values map to values.  You also have some implicit property
(maybe named "children") to which child elements map.  This is a bit
different from Mark Baker's example, where elements mapped to items, but
child elements mapped to properties (and I assume this alternates; which
is known as "striping" in RDF, and the source of much distaste).  But
maybe you are seeing the issue with XML.  With XML, you have to have a
convention for which stuff maps to (s, p, o), where with RDF it isn't a
matter of choice.

> -----Original Message-----
> From: Robert Koberg [mailto:rob@koberg.com] 
> Sent: Friday, June 04, 2004 10:11 AM
> To: Joshua Allen
> Cc: XML Developers List
> Subject: Re: [xml-dev] Semantic Web permathread, iteration 
> n+1 (was Re: [xml-dev] InfoWorld agrees with Elliote Rusty Harold)
> Joshua Allen wrote:
> > scenarios.  OSAF Chandler is based on "triples", as is 
> Longhorn's WinFS.
> I am trying to get a handle on this issue. Can you post an 
> example or link of WinFS XML(?) or triples? I have googled 
> around but only find blog entries with no examples. 
> Specifically, what does a 'folder' within a 'folder' look 
> like? Is a page the end, or in other words is it the content?
> For me, it is easier to represent it as a light hierarchy and 
> pull in extra metadata/content when needed. I keep minimal 
> metadata in the hierarchy and then more metadata/content for 
> each node is kept in a separate file. The extra metadata 
> further references the content assigned in a region element 
> -- so a page is basically a 'folder' of content pieces 
> (content assigned at the folder level cascades down to the 
> pages in that folder). For example here is the hierarchical
> representation:
> <site xmlns="http://livestoryboard.com/schemas/lsb"; generate="1" 
> label="Home"
>    id="demo_root" css="default.css" xsl="default" name="DEMO" 
> index_page="site_ind">
>    <page generate="1" id="site_ind" label="Welcome" 
> name="Welcome.html"/>
>    <folder generate="1" label="Destinations" id="f1034364271" 
> onnav="1"
>      name="Destinations" index_page="p1958461133">
>      <page generate="1" id="p1958461133" label="Introduction 
> to Destinations" name="destinations.html"/>
>      <folder generate="1" label="Sailing" id="f611591524" onnav="1" 
> name="Sailing" index_page="p1211385515">
>        <page generate="1" id="p1211385515" 
> label="Introduction to Sailing" name="sailing.html"/>
>      </folder>
>    </folder>
>    <topic label="content_root" id="t339321861" xsl="topics" 
> name="t339321861">
>      <content label="homepromo" id="c682201793" name="tester.html"/>
>      <content label="placeholder" id="c780459541" 
> name="placeholder.html"/>
>      <content label="right" id="c807589041" name="c807589041.html"/>
>      <topic id="t235257654" label="Test Topic" 
> name="TestTopic" generate="1"
>        onnav="1" xsl="topics">
>        <content id="c408766032" label="Article 1" name="Article1.html"
>          generate="1" onnav="1"/>
>      </topic>
>    </topic>
> </site>
> And here is extra metadata from a single page above (named 
> p1958461133.xml):
> <md-page xmlns="http://livestoryboard.com/schemas/lsb";
>    created="2004-03-28T09:22:57" creator="rkoberg" 
> last_mod_by="ikoberg"
>    modified="2004-05-03T09:51:54" status="editorial">
>    <title>A longer title than the label</title>
>    <description>All about cool sailing destinations.</description>
>    <regions>
>      <region name="narrowColumn">
>        <content ref="c408766032"/>
>      </region>
>      <region name="wideColumn">
>        <content ref="c780459541"/>
>        <content ref="c682201793"/>
>      </region>
>    </regions>
>    <property name="somename">some value</property> </md-page>
> best,
> -Rob


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS