powdering_logos_again.html 18.1 KB
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css" media="all">
    @import "/QA/2006/01/blogstyle.css";
    </style>
    <meta name="keywords" content='OWL, POWDER, RDF, RDFa, Semantic Web' />
    <meta name="description" content="Quite a while ago I wrote a 
short blog
on how to use the upcoming POWDER spec. The example was to create RDF triples expressing copyright information on Semantic Web logos. Lot has happened with POWDER since, and most of what I wrote in that blog is now technically outdated:-( So here is the updated example." />
    <meta name="revision" content="$Id: powdering_logos_again.html,v 1.75 2011/12/16 03:03:02 gerald Exp $" />    
   <link rel="alternate" type="application/atom+xml" title="Atom" href="http://www.w3.org/QA/atom.xml" />
   <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="http://www.w3.org/QA/news.rss" />   
   <title>Powdering logos (again) - W3C Blog</title>

   <link rel="start" href="http://www.w3.org/QA/" title="Home" />
   <link rel="prev" href="http://www.w3.org/QA/2008/09/caching_xml_data_at_install_ti.html" title="Caching XML data at install time" />
   <link rel="next" href="http://www.w3.org/QA/2008/09/howto-insert-youtube-video.html" title="How To Insert A Video From Youtube" />

   <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about="http://www.w3.org/QA/2008/09/powdering_logos_again.html"
    trackback:ping="http://www.w3.org/QA/sununga/mt-tb.cgi/215"
    dc:title="Powdering logos (again)"
    dc:identifier="http://www.w3.org/QA/2008/09/powdering_logos_again.html"
    dc:subject="Semantic Web"
    dc:description="Quite a while ago I wrote a 
&lt;a href=&quot;http://ivanherman.wordpress.com/2007/11/02/powdering-logos/&quot;&gt;short blog&lt;/a&gt;
on how to use the upcoming &lt;a href=&quot;http://www.w3.org/TR/powder-dr&quot;&gt;POWDER&lt;/a&gt; spec. The example was to create RDF triples expressing copyright information on &lt;a href=&quot;http://www.w3.org/2007/10/sw-logos&quot;&gt;Semantic Web logos&lt;/a&gt;. Lot has happened with POWDER since, and most of what I wrote in that blog is now technically outdated:-( So here is the updated example."
    dc:creator="Ivan Herman"
    dc:date="2008-09-05T20:54:18+00:00" />
</rdf:RDF>
-->

    <!-- <script type="text/javascript" src="http://www.w3.org/QA/mt.js"></script>-->

</head>
<body class="layout-one-column">
      <div id="banner">
      <h1 id="title">
	<a href="http://www.w3.org/"><img height="48" alt="W3C" id="logo" src="http://www.w3.org/Icons/WWW/w3c_home_nb" /></a>
W3C Blog
</h1>
    </div>
    
    <ul class="navbar" id="menu">
        <li><strong><a href="/QA/" title="W3C Blog Home">[ W3C Blog ]</a></strong></li>
        <li><a href="/QA/Library/" title="Documents and Publications on Web and Quality">Documents</a></li>
        <li><a href="/QA/Tools/" accesskey="3" title="Validators and other Tools">Tools</a></li>
        <li><a href="/2007/12/qa-blog-help/index#feedback">Feedback</a></li>
    </ul>
<div id="searchbox">
<form method="get" action="http://www.google.com/custom" enctype="application/x-www-form-urlencoded">
<p id="formbox"><input type="text" size="15" class="textfield" name="q" accesskey="E" maxlength="255" /> <input type="submit" class="submitfield" value="Search" id="goButton" name="sa" accesskey="G" /> <input type="hidden" name="cof" value="T:black;LW:72;ALC:#ff3300;L:http://www.w3.org/Icons/w3c_home;LC:#000099;LH:48;BGC:white;AH:left;VLC:#660066;GL:0;AWFID:0b9847e42caf283e;" /><input type="hidden" id="searchW3C" name="sitesearch" checked="checked" value="www.w3.org/QA" /><input type="hidden" name="domains" value="www.w3.org/QA" /></p>
</form>
</div>


    <div id="main"><!-- This DIV encapsulates everything in this page - necessary for the positioning -->

                     <p class="content-nav">
                        <a href="http://www.w3.org/QA/2008/09/caching_xml_data_at_install_ti.html">&laquo; Caching XML data at install time</a> |
                        <a href="http://www.w3.org/QA/">Main</a>
                        | <a href="http://www.w3.org/QA/2008/09/howto-insert-youtube-video.html">How To Insert A Video From Youtube &raquo;</a>
                     </p>

                        <h2 class="entry-header">Powdering logos (again)</h2>
                           <div class="entry-body">
                              <p>Quite a while ago (and on a different blog, actually) I wrote a 
<a href="http://ivanherman.wordpress.com/2007/11/02/powdering-logos/">short blog</a>
on how to use the upcoming <a href="http://www.w3.org/TR/powder-dr">POWDER</a> spec. The example was to create RDF triples expressing copyright information on <a href="http://www.w3.org/2007/10/sw-logos">Semantic Web logos</a>. Lot has happened with POWDER since, and most of what I wrote in that blog is now technically outdated:-( So here is the updated example. The goal remains the same: a POWDER-aware processor should be able, following its nose, to find copyright information expressed in RDF for the various logos.
</p>
<p>
One starts with the <a href="http://www.w3.org/2007/10/sw-logos.html">index page</a> of the logos. The page is, in fact, using RDFa; the <a href="http://www.w3.org/2007/08/pyRdfa/extract?uri=http%3A//www.w3.org/2007/10/sw-logos.html">extracted RDF information</a> includes the triple:</p>

<pre>&lt;&gt; wdrs:describedBy &lt;http://www.w3.org/Icons/SW/CopyrightResources.xml&gt;
</pre>

<p>
which gives the <a href="http://www.w3.org/Icons/SW/CopyrightResources.xml">URI for the real POWDER content</a>. (There could be other ways to find that XML file, but, well, that what I chose to use.)
</p>
<p>
The first difference, compared to the <a href="http://ivanherman.wordpress.com/2007/11/02/powdering-logos/">previous version</a>, is that this file is in XML and not in RDF. This XML format is one of the formats of POWDER; it is easier to read and write. Although a dedicated POWDER processor can handle this file directly, this file is, conceptually, converted to an OWL file (referred to as POWDER-S) to express its meaning. More about this later.
</p>
<p>
The XML file contains statements on a number of resources by defining <em>constraints on their URI-s</em>. These are the “IRI sets". To take an example from our document:</p>

<pre>&lt;iriset&gt;
  &lt;includehosts&gt;www.w3.org&lt;/includehosts&gt;
  &lt;includepathstartswith&gt;/Icons/SW/&lt;/includepathstartswith&gt;
  &lt;includepathendswith&gt;.png .svg .gif .eps&lt;/includepathendswith&gt;
  &lt;excludepathstartswith&gt;/Icons/SW/Buttons&lt;/excludepathstartswith&gt;
  &lt;excluderegex&gt;w3c&lt;/excluderegex&gt;
&lt;/iriset&gt;
</pre>

<p>One can read that relatively easily: the set includes URI-s like <code>http://www.w3.org/Icons/SW/something.png</code> but it does not include <code>http://www.w3.org/Icons/SW/something-w3c.gif</code>. (There are a number of other possibilities like constraining on the port numbers; see the <a href="http://www.w3.org/TR/2008/WD-powder-grouping-20080815/">“Grouping of Resources”</a> document for further details.) The important point to remember is that this part of the XML file <em>defines (RDF) resources by constraining their URI-s</em>.
</p>
<p>
Once we have the resources we want to characterize, we have to define <em>what</em> properties those resources have. This is defined in a separate portion of the file. Our example says, for example:
</p>

<pre>&lt;descriptorset&gt;
  &lt;typeof             src="http://creativecommons.org/ns#Work"/&gt;
  &lt;cc:license         rdf:resource='http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231'/&gt;
  &lt;cc:attributionURL  rdf:resource='http://www.w3.org/2001/sw/'/&gt;
	...
&lt;/descriptorset&gt;
</pre>
<p>
By combining the two sets of information, a POWDER processor can deduce, for example, the following set of RDF triples for a URI it finds on the site:
</p>
<pre>&lt;http://www.w3.org/Icons/SW/sw-cube.png&gt;
  a &lt;http://creativecommons.org/ns#Work&gt;;
  cc:license &lt;http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231&gt;;
  cc:attributionURL &lt;http://www.w3.org/2001/sw/&gt; 
  ...
 </pre>
<p> 
And voilà! Simple, isn’t it? Well… of course, as always, the devil is in the details. If you are interested to understand how all this comes about in Semantic Web land then go on reading; if not, just stop here…
</p>
<p>
You continued reading? Well, you have been warned:-) The trick is that the XML file is “canonically” converted into an OWL file (which I’ve put up on the Web, too: <a href="http://www.w3.org/Icons/SW/CopyrightResources.rdf"><code>CopyrightResources.rdf</code></a>). The fundamental structure of the OWL equivalent is as follows:
</p>

<ol>
   <li>the “IRI set” defines an (anonymous) class of resources, say, <code>_:iriset</code>.</li><li>
   </li><li>the “descriptor set” defines another, anonymous class of resources (say <code>_:descriptorset</code>) through the intersection of a number of <code>owl:hasValue</code> property restrictions.</li>
   <li>an extra OWL statement is issued, saying that <code>_:iriset</code> is a subclass of <code>_:descriptorset</code>. What this means, in human terms, is that each resource in <code>_:iriset</code> will be the subject of triples with the properties listed in the property restrictions.</li>
</ol>

<p>
Item #2 is actually fairly simple. Here is a portion of what happens in our example after the transformation to OWL (the file itself is in RDF/XML, but I use turtle to make it more readable): 
</p>

<pre>_:descriptorset a owl:Class;
   rdfs:subClassOf &lt;http://creativecommons.org/ns#Work&gt;;
   owl:intersectionOf (
     [ a owl:Restriction;
       owl:onProperty cc:license;
       owl:hasValue &lt;http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231&gt;
    ]
    [ a owl:Restriction; 
      owl:onProperty cc:attributionURL;
      owl:hasValue &lt;http://www.w3.org/2001/sw/&gt;;
    ]
    ...
   )
</pre>	 


So far so good. But the tricky one is item #1 on our list. The constraints on the IRI-s are translated into restrictions again, but the values for this restrictions are regular expressions. What happens in our example is:


<pre>_:iriset a owl:Class;
  owl:intersectionOf (
    [ a owl:Restriction;
      owl:onProperty &lt;http://www.w3.org/2007/05/powder-s#matchesregex&gt;;
      owl:hasValue "\:\/\/(([^\/\?\#]*)\@)?([^\:\/\?\#\@]*)(\:([0-9]+))?\(\/Icons\/SW\/\)"
    ]
    ...
  )
</pre>
<p>
This is not very readable but, well, regular expressions have never been pretty… But that is not the real complication for the IRI sets. There is also a subtle but important semantic point. What is exactly this “matchesregex” property? Well, it assigns to an RDF resource its URI <em>as a string</em> and matches it against a regular expression. The problem is that this <em>cannot</em> be expressed in regular RDF+OWL semantics. The “space” of URI-s and that of resources are strictly separated, and there is no standard “bridge” between the two. There is no way around it: the POWDER document has to extend the standard semantics to accommodate this (see <a href="http://www.w3.org/TR/2008/WD-powder-formal-20080815/#regexSemantics">the formal document</a> for details). What this means in practice is that to deduce the targeted RDF triples, eg,
</p>

<pre>&lt;http://www.w3.org/Icons/SW/sw-cube.png&gt;
  cc:license &lt;http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231&gt;;
  ...
</pre>

<p>
the processor <em>must</em> be POWDER aware; just a general RDF/OWL tool won’t do it. It is not a complex extension, but has to be there.
</p>
<p>
You have been warned: the semantic side is a little bit more complex. But most of the users do not care what is under the hood and these complexities are well hidden; the complexities are of interest for implementers only. On the other hand, POWDER will be a really important piece of the Semantic Web landscape! 
</p>
<p>
Formally, POWDER is in last call. If you are interested, then this is the time to send in your comments!
</p>

<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/70d92063-3f9e-4a36-ac38-995ef22c8e37/" title="Zemified by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=70d92063-3f9e-4a36-ac38-995ef22c8e37" alt="Reblog this post [with Zemanta]"></a></div>
                           </div>
                           <div id="more" class="entry-more">
                              
                           </div>
                       <p class="postinfo">Filed by <a href="http://www.w3.org/People/Ivan">Ivan Herman</a> on September  5, 2008  8:54 PM in <a href="http://www.w3.org/QA/archive/technology/semantic_web/">Semantic Web</a>, <a href="http://www.w3.org/QA/archive/technology/">Technology</a>, <a href="http://www.w3.org/QA/archive/w3cqa_news/technology_101/">Technology 101</a>, <a href="http://www.w3.org/QA/archive/w3cqa_news/">W3C・QA News</a><br />
<span class="separator">|</span> <a class="permalink" href="http://www.w3.org/QA/2008/09/powdering_logos_again.html">Permalink</a>
                                 | <a href="http://www.w3.org/QA/2008/09/powdering_logos_again.html#comments">Comments (1)</a>
                                 | <a href="http://www.w3.org/QA/2008/09/powdering_logos_again.html#trackback">TrackBacks (0)</a>
</p>



<h3 class="comments-header" id="comments">Comments</h3>
<div class="comment" id="comment-165701">
<p class="comment-meta" id="c165701">
<span class="comment-meta-author"><strong>Simon Reinhardt </strong></span>
<span class="comment-meta-date"><a href="#c165701">#</a> 2008-09-14</span>
</p>
<div class="comment-bulk">
<p>Thanks, this serves as a nice introduction into the POWDER world. :-)
Maybe you can quickly answer me some questions without me having to dive deep into the docs.</p>

<p>First, I can't find links to GRDDL transformations in the POWDER document or in its namespace document (when I dereference the namespace URI in my browser I get <a href="http://www.w3.org/2007/05/powder/wdr.xsd)." rel="nofollow">http://www.w3.org/2007/05/powder/wdr.xsd).</a> Is the transition to POWDER-S just not that easy or is it planned to have an XSLT file linked from there in the future?</p>

<p>Second, what happens when the descriptor set has two properties with the same predicate but different values? I suppose that would lead to two restrictions, but wouldn't they conflict in OWL? Or does POWDER just not allow identical predicates?</p>

<p>Thanks,
  Simon</p>

</div>
</div>



  <div class="comments-open" id="comments-open">
<h3 class="comments-open-header">Leave a comment</h3>

<div class="comments-open-moderated">
   <p>
   Note: this blog is intended to foster <strong>polite
   on-topic discussions</strong>. Comments failing these
   requirements and spam will not get published. Please,
   enter your real name and email address. Every
   individual comment is reviewed by the W3C staff.
   This may take some time, thank you for your patience.
   </p>
   <p>
   You can use the following HTML markup (a href, b, i, 
   br/, p, strong, em, ul, ol, li, blockquote, pre) 
   and/or <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a>.</p>
</div>

<div id="comments-open-data">
<form method="post" action="http://www.w3.org/QA/sununga/beach.pl" id="comments-form">
<h4>Your comment</h4>
<div id="comments-open-text">
  <textarea id="comment-text" name="text" rows="20" cols="100"></textarea><br />
<label for="comment-text">Write your comment text here. Remember, keep the discussion on topic and courteous.</label>
</div>

<h4>About you</h4>
<div id="comment-form-name">
  <input type="hidden" name="static" value="1" />
<input type="hidden" name="entry_id" value="225" />
<input type="hidden" name="__lang" value="en" /> 
<label for="comment-author">Your Name</label>
<input id="comment-author" name="author" size="30" value="" />
</div>
<div id="comment-form-email">
<label for="comment-email">Your Email Address</label>
<input id="comment-email" name="email" size="30" value="" />
</div>

<div id="comments-open-footer">
<input type="submit" accesskey="s" name="post" id="comment-submit" value="Submit" />

</div>
</form>
</div>
</div>



<p id="gentime">This page was last generated on $Date: 2011/12/16 03:03:02 $</p> 

      </div><!-- End of "main" DIV. -->

<address>

This blog is written by W3C staff and working group participants,<br />
&nbsp;and maintained by <a href="/People/CMercier/">Coralie Mercier</a>.<br />
Authorized parties may <a href="/QA/new">log in</a> to create a new entry.<br/>
<span id="poweredby">Powered by Movable Type, magpierss and a lot of Web Technology</span>
    </address>


    
    <p class="copyright">
      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2011
      <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>&reg;
      (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
      <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
      <a href="http://www.keio.ac.jp/">Keio</a>),
      All Rights Reserved.
      W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
      <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
      and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
      rules apply. Your interactions with this site are in accordance
      with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and
      <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy
      statements.
    </p>

  </body>
</html>