W3C home > Mailing lists > Public > www-tag@w3.org > October 2009

Re: web architecture and safe content

From: David Booth <david@dbooth.org>
Date: Mon, 12 Oct 2009 09:52:33 -0400
To: Mukul Gandhi <gandhi.mukul@gmail.com>
Cc: Dan Brickley <danbri@danbri.org>, Karl Dubost <karl@la-grange.net>, www-tag@w3.org
Message-Id: <1255355553.5481.7669.camel@dbooth-laptop>
Mukul,

Be forewarned that the RDF/XML syntax is quite awkward to read (IMO).
There are other syntaxes for RDF that are more human friendly.  One is
N3:
http://www.w3.org/2000/10/swap/Primer 
Another (actually a subset of N3) is N-triples:
http://www.w3.org/TR/rdf-testcases/#ntriples 

Here is a converter that transforms RDF/XML to N3 or N-triples:
http://www.mindswap.org/2002/rdfconvert/ 

Below is the same RDF content that Dan Brickley sent, serialized as N3
and N-triples syntax.

========================  N3 ===========================

#Processed by Id: cwm.py,v 1.144 2003/09/14 20:20:20 timbl Exp 
        #    using base file:/tmp/tmpCfnXdZ-rdfconverter
        
#  Notation3 generation by
#       notation3.py,v 1.148 2003/12/04 21:20:17 timbl Exp

#   Base was: file:/tmp/tmpCfnXdZ-rdfconverter
     @prefix : <#> .
     @prefix dc: <http://purl.org/dc/elements/1.1/> .
     @prefix dcterms: <http://purl.org/dc/terms/> .
     @prefix icra: <http://www.icra.org/rdfs/vocabularyv03#> .
     @prefix label: <http://www.w3.org/2004/12/q/contentlabel#> .
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    
    <>     dc:creator <http://www.icra.org>;
         dcterms:issued "2007-3-27";
         label:authorityFor "http://www.icra.org/rdfs/vocabularyv03#" .
      [      a label:Ruleset;
             label:hasDefaultLabel :label_1;
             label:hasHostRestrictions  [
                 a label:Hosts;
                 label:hostRestriction "playboy.com" ] ].
    
    :label_1     a label:ContentLabel;
         icra:cz "1";
         icra:lc "1";
         icra:na "1";
         icra:nb "1";
         icra:oz "1";
         icra:sf "1";
         icra:vz "1";
         rdfs:comment "Label for all/most of website";
         rdfs:label """Exposed breasts; Bare buttocks; Erotica; No violence;
Mild expletives; No potentially harmful activities; No user-generated
content; This material appears in an artistic context; """;
         label:hasModifier  [
             a icra:xa ] .
    
#ENDS

======================== N-Triples ========================

<file:/tmp/tmprbjeFO-rdfconverter>     <http://purl.org/dc/elements/1.1/creator> <http://www.icra.org> .
<file:/tmp/tmprbjeFO-rdfconverter>     <http://purl.org/dc/terms/issued> "2007-3-27" .
<file:/tmp/tmprbjeFO-rdfconverter>     <http://www.w3.org/2004/12/q/contentlabel#authorityFor> "http://www.icra.org/rdfs/vocabularyv03#" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2004/12/q/contentlabel#ContentLabel> .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#cz> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#lc> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#na> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#nb> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#oz> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#sf> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.icra.org/rdfs/vocabularyv03#vz> "1" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.w3.org/2000/01/rdf-schema#comment> "Label for all/most of website" .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.w3.org/2000/01/rdf-schema#label> "Exposed breasts; Bare buttocks; Erotica; No violence;\nMild expletives; No potentially harmful activities; No user-generated\ncontent; This material appears in an artistic context; " .
<file:/tmp/tmprbjeFO-rdfconverter#label_1>     <http://www.w3.org/2004/12/q/contentlabel#hasModifier> _:ag2 .
_:ag2     <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.icra.org/rdfs/vocabularyv03#xa> .
_:ag1     <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2004/12/q/contentlabel#Hosts> .
_:ag1     <http://www.w3.org/2004/12/q/contentlabel#hostRestriction> "playboy.com" .
_:ag0     <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2004/12/q/contentlabel#Ruleset> .
_:ag0     <http://www.w3.org/2004/12/q/contentlabel#hasDefaultLabel> <file:/tmp/tmprbjeFO-rdfconverter#label_1> .
_:ag0     <http://www.w3.org/2004/12/q/contentlabel#hasHostRestrictions> _:ag1 .

======================================================================

David Booth

On Sun, 2009-10-11 at 23:27 +0530, Mukul Gandhi wrote:
> Thanks, Dan for sharing the RDF code.
> 
> I am not too much familiar with RDF syntax. I'll try to read more
> about RDF, to learn how it helps with this issue.
> 
> I appreciate your taking interest in this topic.
> 
> On Sun, Oct 11, 2009 at 9:04 PM, Dan Brickley <danbri@danbri.org> wrote:
> > I'll include a version below, so it'll be in W3C archives too. Either
> > way, it contains no adult content directly, unless you consider the
> > words 'buttocks', 'breasts' etc to be intrinsically problematic...
> >
> > cheers,
> >
> > Dan
> >
> > <?xml version="1.0" encoding="iso-8859-1"?>
> > <rdf:RDF
> >  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> >  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
> >  xmlns:dc="http://purl.org/dc/elements/1.1/"
> >  xmlns:dcterms="http://purl.org/dc/terms/"
> >  xmlns:label="http://www.w3.org/2004/12/q/contentlabel#"
> >  xmlns:icra="http://www.icra.org/rdfs/vocabularyv03#">
> >
> >  <rdf:Description rdf:about="">
> >    <dc:creator rdf:resource="http://www.icra.org" />
> >    <dcterms:issued>2007-3-27</dcterms:issued>
> >    <label:authorityFor>http://www.icra.org/rdfs/vocabularyv03#</label:authorityFor>
> >  </rdf:Description>
> >
> >  <label:Ruleset>
> >
> >    <label:hasHostRestrictions>
> >      <label:Hosts>
> >        <label:hostRestriction>playboy.com</label:hostRestriction>
> >      </label:Hosts>
> >    </label:hasHostRestrictions>
> >    <label:hasDefaultLabel rdf:resource="#label_1" />
> >  </label:Ruleset>
> >
> >  <label:ContentLabel rdf:ID="label_1">
> >
> >    <rdfs:comment>Label for all/most of website</rdfs:comment>
> >    <icra:na>1</icra:na>
> >    <icra:nb>1</icra:nb>
> >    <icra:sf>1</icra:sf>
> >    <icra:vz>1</icra:vz>
> >    <icra:lc>1</icra:lc>
> >
> >    <icra:oz>1</icra:oz>
> >    <icra:cz>1</icra:cz>
> >    <label:hasModifier><icra:xa /></label:hasModifier>
> >    <rdfs:label>Exposed breasts; Bare buttocks; Erotica; No violence;
> > Mild expletives; No potentially harmful activities; No user-generated
> > content; This material appears in an artistic context; </rdfs:label>
> >  </label:ContentLabel>
> >
> > </rdf:RDF>
> 
> 
> 
-- 
David Booth, Ph.D.
Cleveland Clinic (contractor)

Opinions expressed herein are those of the author and do not necessarily
reflect those of Cleveland Clinic.
Received on Monday, 12 October 2009 13:53:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:48:17 GMT